## 2 Materials and Methods
### Methods
#### 2.2.1 The Hierarchical PLS-DA Classification Model
More in detail, the performance of the selected pre-processing algorithms for the hierarchical classification model rules was evaluated. Indeed, the hierarchical model was built based on 2 different rules. Each rule is characterized by the application of different pre-processing algorithms (i.e., Normalize, Standard Normal Variate (SNV), Detrend and Mean Centering (MC)), as shown in Table 2, to optimize the recognition of the different polymers constituting microplastic particles. In more detail, Rule 1 is defined using the Normalize, SNV, Detrend, and MC algorithms, whereas Rule 2 incorporates the Detrend, Normalize, and MC preprocessing methods. In Rule 1, three categories were discriminated: PE, the polymer mix (i.e., PP, EPS, PS) and not identified (NI). PP, EPS, PS are considered as only one class since these three polymers share more similar characteristics: preprocessing is applied to distinguish them from PE. Then, Rule 2, by applying additional preprocessing steps, identifies each single polymer in the mix and NI. Normalize is a common approach used to solve the multiplicative scaling problem [58]. This step is crucial for comparing spectra that may have different scales due to experimental conditions. One of the most often used techniques for scatter correction of NIR data is SNV, which creates a signal with zero mean and unitary variance from each observed spectrum [59]. Therefore, SNV helps to minimize the effects of scatter, allowing for a more reliable interpretation of spectral data. The Detrend algorithm was applied to remove  
Figure 2: Dendrogram showing the hierarchical PLS-DA model built to classify the four different polymers constituting microplastic particles: PE, PP, EPS, PS and not identified (NI). constant, linear, or curved offset that could bias the data. MC is a frequently used preprocessing method in HSI analysis. It involves calculating the mean value for each column and then subtracting this mean from each element in the column. This adjustment results in a mean-centered data matrix, where each row reflects the deviation of that sample from the average sample across all columns in the original dataset, facilitating better comparison and analysis of the spectral data. Spectra pre-processing allows for the enhancement of the different spectral features of the polymers, leading to more accurate interpretations and results in the analysis. To evaluate the quality of each produced PLS-DA model and select the optimal latent variables (LVs), a Venetian blinds cross-validation with 10 splits and a blind thickness of 1 was employed. This method divides the dataset into ten equal parts; in each iteration, one segment serves as the test set while the other nine are used for training. This ensures that each part of the dataset is tested separately, improving the reliability of the evaluations. From the calibration and cross-validation values, sensitivity and specificity were calculated to comprehensively assess the model's performance. The average performance metrics obtained from each iteration provide a more accurate estimate of the model's effectiveness on unseen data, allowing for better-informed decisions regarding model optimization. Sensitivity and specificity were measured during calibration (Cal) and cross-validation (CV) of the developed classification models using the following equations:  
\[\text{Sensitivity:}\frac{\text{TP}}{\text{TP}+\text{FN}}, \tag{1}\]  
\[\text{Specificity:}\frac{\text{TN}}{\text{TN}+\text{FP}} \tag{2}\]  
TP being the true positives and FN the false negatives. Sensitivity measures the actual positive values identified as such. Specificity measures the negative values accurately detected. The sensitivity and specificity of a perfect prediction model would be equal to 1. The best models are achieved when the sensitivity and specificity values, for both calibration (Cal) and cross-validation (CV), are similar, indicating the robustness of the developed model [60].