## 2 Materials and Methods
### Artificial Intelligence and Multivariate Analysis  
MVAs such as PLS-DA and PCA were implemented using the PLS-Toolbox 8.0 (Eigenvector Research, Inc., Wenatchee, WA, USA) for MATLAB ver. 8.6.0.267246 (R2015b; The Math Works Inc. Natick, MA, USA). The results of the PLS-DA modeling were initially evaluated in terms of leave-one-out cross-validation (CV) [55] and external evaluation (Pred). The Pred was accomplished using new samples that were not used in the calibration (Cal) model. Standard normal variate (SNV) was applied as a preprocessing step to all spectral data. The preprocessing allowed the models to provide better results compared to the derivatives and mean centering since SNV eliminates contributions due to variations in the particle size of the different soil types utilized in the study. The performance of the PLS-DA models was evaluated using the parameters of a confusion matrix, such as sensitivity and specificity of the calibration, validation, and prediction. Sensitivity is the number of samples predicted to be in a class divided by the number of samples in a class, and specificity is the number of samples predicted to not be in a class divided by the actual number of samples, not in a class. The sensitivity and specificity were calculated according to Equations (1) and (2), respectively [50]:  
\[\text{Sensitivity}=\text{TP/(TP+FN)} \tag{1}\]  
\[\text{Specificity}=\text{TN/(TN+FP)} \tag{2}\]  
where TP, FN, TN, and FP represent the number of true positives, false negatives, true negatives, and false positives. In this work, soils mixed with petroleum and diesel were considered \"positive\", and soils/sand without added petroleum or diesel were considered \"negative.\" The values for the sensitivity and specificity were calculated for each model, namely, sensitivity (Cal), sensitivity (CV), and sensitivity (Pred), and specificity (Cal), specificity (CV), and specificity (Pred). SVM was employed using the Logistic Regression CV module to build a classification model using the library of sklearn 3.2 in Python 3. The best hyperparameter was selected by the cross validator, Stratified Kfolds, and was evaluated in terms of CV. The package of libraries in scikit-learn [56] provides a set of open-source software of efficient AI techniques for the Python programming language. They are accessible to non-experts of machine learning and apply to various scientific areas. The external evaluation of the predictions was accomplished using new samples that were not used in the classification model. The criteria that were used to evaluate the performance of the classification model developed with SVM_LogisticRegressionCV were recall, precision, f1-score, support, and accuracy. In binary classification, recall of the positive class is also known as \"sensitivity,\" and recall of the negative class is \"specificity.\" The precision is also called termed the positive predicted value and is the ratio TP/(TP + FP) where TP is the number of true positives and FP is the number of false positives. The precision (intuitively) is the ability of the classifier of not labeling as positive a sample that is negative. The f1-score is also known as the balanced f-score or the f-measure. The f1-score can be interpreted as a weighted average of the precision and recall, where the f1-score best value is 1 and the worst is 0. The relative contributions of precision and recall to the f1-score are equal. The formula for the f1-score is shown in Equation (3):  
\[\text{f1-score}=2*(\text{precision}*\text{recall})/(\text{precision}+\text{ recall}) \tag{3}\]  
The f1-score in the multi-class and multi-label cases is the average of the f1-score for each class with weighting that depends on the average parameter. The supported parameter in the SVM is the number of occurrences of each class in y_true. The accuracy classification score in multi-label classification computes accuracy subset: the set of labels predicted for a sample must exactly match the corresponding set of labels in y_true.