# Machine Learning Ship Classifiers for Signals from Passive Sonars
## 5 Results
### Linear Discriminant Analysis  
When using the Lofar signal as a feature vector, the LDA classifier was expected to perform well because the number of classes was inherently embedded within the structure of the signal. This suggests that the Lofar signal serves as an ideal discriminant when classes are well separated. The optimal hyperparameters for each model are listed in Table 10 to maximize the performance.  
\begin{table}
\begin{tabular}{l c c c c c c} \hline \hline \multirow{2}{*}{**Hyperparameter**} & \multicolumn{2}{c}{**Lofar**} & \multicolumn{2}{c}{**PCA**} & \multicolumn{2}{c}{**NLPCA**} \\  & **w/ Dec** & **w/o Dec.** & **w/ Dec** & **w/o Dec.** & **w/ Dec** & **w/o Dec** \\ \hline C (Regularization Parameter) & 1.361 & 1.361 & 0.766 & 0.766 & 0.7661 & 0.7661 \\ \hline Solver & Liblinear & Liblinear & Liblinear & Liblinear & Liblinear & Liblinear \\ \hline Penalty & \(\ell_{1}\) & \(\ell_{1}\) & \(\ell_{1}\) & \(\ell_{1}\) & \(\ell_{1}\) & \(\ell_{1}\) \\ \hline Mean Accuracy \(\bar{\alpha}cc\) & 0.932 & 0.917 & 0.972 & 0.995 & 0.972 & 0.995 \\ \hline Standard Error (SE) & 4.21 \(\cdot 10^{-2}\) & 4.42 \(\cdot 10^{-2}\) & 4.42 \(\cdot 10^{-3}\) & 2.70 \(\cdot 10^{-2}\) & 4.42 \(\cdot 10^{-3}\) & 2.69 \(\cdot 10^{-3}\) \\ \hline \hline \end{tabular}
\end{table}
Table 8: Logistic regression (_one_\(\times\)_one_) hyperparameters and the model’s performance for the Lofar, PCA, and NLPCA variations of the database.  
\begin{table}
\begin{tabular}{l c c c c c c} \hline \hline \multirow{2}{*}{**Hyperparameter**} & \multicolumn{2}{c}{**Lofar**} & \multicolumn{2}{c}{**PCA**} & \multicolumn{2}{c}{**NLPCA**} \\  & **w/ Dec** & **w/o Dec.** & **w/ Dec** & **w/o Dec.** & **w/ Dec** & **w/o Dec** \\ \hline C (Regularization Parameter) & 14.503 & 14.503 & 0.822 & 0.822 & 0.822 & 0.822 \\ \hline Solver & Liblinear & Liblinear & Liblinear & Liblinear & Liblinear & Liblinear \\ \hline Penalty & \(\ell_{1}\) & \(\ell_{1}\) & \(\ell_{1}\) & \(\ell_{1}\) & \(\ell_{1}\) & \(\ell_{1}\) \\ \hline Mean Accuracy \(\bar{\alpha}cc\) & 0.917 & 0.995 & 0.929 & 0.995 & 0.929 & 0.995 \\ \hline Standard Error (SE) & 4.42 \(\cdot 10^{-2}\) & 2.63 \(\cdot 10^{-3}\) & 4.08 \(\cdot 10^{-3}\) & 2.53 \(\cdot 10^{-3}\) & 4.08 \(\cdot 10^{-3}\) & 2.53 \(\cdot 10^{-3}\) \\ \hline \hline \end{tabular}
\end{table}
Table 9: Logistic regression (_one_\(\times\)_all_) hyperparameters and the model’s performance for the Lofar, PCA, and NLPCA variations of the database.  
The LDA classifier performed very well, where it achieved a 0.99 accuracy without decimation for all the dataset variations (Lofar, PCA, and NLPCA). The model was slightly impacted by decimation, where the mean accuracy dropped to 0.86 for Lofar and PCA and 0.90 for NLPCA. However, the performance remained robust across all the datasets, where NLPCA demonstrated a marginally better ability to handle decimation. The consistency of the model was also high, as reflected by the low standard errors. The choice of 10 components for Lofar and 5 for PCA and NLPCA seemed appropriate and did not significantly affect the overall performance.