# Machine Learning Ship Classifiers for Signals from Passive Sonars
## 2 Preprocessing Chain for SoNaR Signals
### Principal Component Analysis  
PCA represents a set of vectors using a subspace spanned by the singular vectors of incoming data. PCA can be used to reduce data dimensions when data features are highly correlated, making the data more suitable for regression and classification models that generally assume independence between the features [25]. The limitations of PCA lie in its assumption of linearity [26] when selecting an appropriate number of principal components capable of representing the data with a definable reconstruction error and loss of interpretability of the original characteristics.  
PCA normalizes the dataset to ensure that each variable has a mean of 0 and a standard deviation equal to 1 so that each variable contributes equally. This reduces the sensitivity to the differences between the variances of the original variables. Significant differences may lead to biased results [26]. Transforming the data into an adequate excursion range avoids this problem.  
The cross-covariance matrix between the feature vectors \(\mathbf{x}\) and the class labels \(\mathbf{y}\) is expressed by \(\mathbf{\Sigma}_{(\mathbf{x},\mathbf{y})}=\frac{1}{n-1}\sum_{i=1}^{n}(\mathbf{ x}_{i}-\boldsymbol{\mu}_{x})(\mathbf{y}_{i}-\boldsymbol{\mu}_{y})^{T}\), where \(\mathbf{x}_{i}\) is the \(i\)-th observation of the feature vector, \(\mathbf{y}_{i}\) is the \(i\)-th observation of the class labels, \(\boldsymbol{\mu}_{x}\) is the mean vector of the features, \(\boldsymbol{\mu}_{y}\) is the mean vector of the class labels, and \(n\) is the number of observations.  
The principal components were derived from eigendecomposition of the autocovariance matrix. The eigenvectors were organized in the decreasing order of the associated eigenvalues, which formed the feature vectors [26]. Most of the information within the original variables is usually concentrated into a few significant components. The principal components comprise a new basis on which the differences between the original observations may become more evident. They represent the directions of the data subspace with maximum variance [26].  
Kernel Nonlinear Principal Component Analysis (Kernel NLPCA) extends the PCA algorithm to capture the nonlinear relations between variables and uses a more compact representation via a kernel. In a higher-dimensional feature space, features may be linearly separated. Subsequently, the use of a higher-dimensional feature space reduces the number of attributes to be evaluated.  
In some applications, there may be a database with many features, and applying transformations that involve many polynomial combinations of these features can lead to extremely high and impractical computational costs. A kernel trick provides a solution to this problem. The trick represents the data only through similarity comparisons and vector products in pairs with the original data \(\mathbf{x}\), relating them to the original coordinates in the lower-dimensional space, and those projected in the larger space instead of explicitly applying the transformations, i.e., \(k(\mathbf{x}  
are projected into a high-dimensional space, but the new space is not explicitly calculated; only its inner products are. The nonlinear mappings of features in a higher dimension can separate data that are inseparable in lower dimensions.  
After preprocessing the SoNaR acoustic signals, the resulting data were presented for the ship classification. Seven ML algorithms were tested to evaluate the best learned to correctly assign the ship class from the feature vector.