## 2 Materials and Methods
### Choice of the Best Classification Model  
The stages implemented using the Scikit Learn library of Python 3.10 were the following:  
* Data preparation and pre-processing;
* Data analysis and exploration;
* Assignment of the characteristic's matrix and the vector of classes or target;
* Codification of the vector of classes or target in dummy variables;  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Classification Algorithms** & **Features** \\ \hline \multirow{2}{*}{Dummy Classifier (DMC)} & It establishes an average reference metric (accuracy) and its standard deviation, by means of which to compare the rest of the classification algorithms. \\  & A different number of templates can belong partially to one class or to several classes. Class membership is measured by a number \(\mu_{A}(x)\) in the interval [0,1], where \\ Fuzzy Classifier & \(\mu_{A}(x)=\begin{cases}0,\ x\
ot\in A\\ 1,\ x\in A\\ 0,1[\ x\in A(p)\end{cases}\) \\  & where “\(A\)” is the class and “\(x\)” is the vector of characteristics or pattern. \\ \hline \multirow{2}{*}{Logistic Regression (LR)} & It predicts the probability of an event or class occurring, conditional on a set of “\(n\)” independent variables. The model always returns the most probable class. \\ \hline \multirow{4}{*}{K-Nearest Neighbors (KNN)} & During the training phase, it searches for the K-nearest neighbors of the point to be classified and subjects them to majority voting—for example, by weighting each neighbor’s vote, according to the inverse square of their distances. An odd number of K will always be used to avoid possible ties. \\ \hline \multirow{4}{*}{Support Vector Machine (SVM)} & It has also been reformulated for regression. The objective is to obtain the best “n-1” dimensional hyperplane to optimally separate one class from another, where “\(n\)” is the number of coordinate axes or independent variables. It is more efficient than KNN in terms of cost and accuracy. \\ \hline \multirow{4}{*}{AdaBoost (Adaptive Boosting)} & It identifies those cases misclassified during training with several weak or base classifiers, giving them a higher weight or importance in successive cycles until the process stops for a certain minimum error value. Lastly, a final robust classifier is constructed as a weighted sum of the previous classifiers. \\ \hline \multirow{4}{*}{Gaussian Process Classifier} & They are used for both regression and classification. They are based on the Gaussian probability distribution. As with SVMs, they require the specification of a covariance function (or kernel). The Gaussian process makes predictions with uncertainty and works well with a small data set, as is the case in this study. \\ \hline \multirow{4}{*}{Random Forest} & It results from a combination of multiple decision trees created during the training phase. Each decision tree votes for one class, with the final result being the class with the highest number of votes in the entire forest. \\ \cline{1-1}  & \multicolumn{1}{c}{} \\ \end{tabular} Note. Own elaboration.  
\end{table}
Table 9: Classification algorithms and their characteristics.  
* Division of the data into training (80%) and testing (20%), with stratification of the output variable, to ensure homogeneity in the representativeness of the data in both groups.
* Training phase:
* Evaluation of the benchmark strategy with DummyClassifier.
* Elaboration of a pipeline containing the SMOTE oversampling technique, the scaling or normalization of the data, and the corresponding classifier.
* Use of the RepeatedStratifiedKFold cross-validation technique to minimize data overfitting.
* Use of the GridSearchCV technique to search for the best parameters.
* Testing phase:
* Model test with records not used during training (without SMOTE).
* Determination of metrics and choice of the model with the best accuracy.
* Printout of results.