## 3 Experiments and Results
### Classification with Other Ensemble Model  
A second experiment has been performed to evaluate the classification with other ensemble models that can be performed in MATLAB using the method called \"fitensable\", which generates an optimized classification model as specified by the user. More specifically, when it is set in automatic mode, the method applies a 5-fold CV and identifies the algorithm with the best performance while the values of the internal variables are updated. Moreover, \"fitcensemble\" allows the user to select the type of algorithms to use and to optimize the number of learning cycles, that refers to the number of weak learners trained (i.e., the number of trees used), and the maximum number of splits.  
First, an ensemble classifier was trained using the bag ensemble aggregation method. This means that the algorithm uses bagging with random predictor selections at each split (random forest). Similar to the previous experiment, the cross-validation strategy was the holdout with 70%-30% ratio between training and test set, repeated 50 times. Table 2 shows the obtained results:  
A first comparison with the previous experiment shows that the values of Accuracy, Sensitivity, and Specificity in this case are greater than the previous ones, showing a difference of 0.91% in accuracy, 1.19% in sensitivity, and 0.89% in specificity. A final remark should be given about the optimal parameters that were computed by the algorithm. In more details, the ensemble strategy is built by evaluating for a certain number of times a classification algorithm updating its parameters, and every time the results are better with respect to the previous runs, the best classifier is updated accordingly.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Number of Trees**} & \multicolumn{3}{c}{**Metrics**} \\ \cline{2-4}  & **Accuracy (\%)** & **Sensitivity (\%)** & **Specificity (\%)** \\ \hline
1 & 90.23 & 90.03 & 90.43 \\ \hline
5 & 92.11 & 93.04 & 91.19 \\ \hline
10 & 92.90 & 94.24 & 91.55 \\ \hline
50 & 93.45 & 95.28 & 91.63 \\ \hline
100 & 93.89 & 95.95 & 91.82 \\ \hline
1000 & 94.14 & 95.28 & 91.63 \\ \hline
10,000 & 94.32 & 96.79 & 91.85 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Accuracy, Sensitivity, and Specificity of Random Forest classifiers using the OULAD dataset. Number of trees represents the number of trees generated by Random Forest. The metrics are averaged with respect to the number of cross-validation (50).  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Metrics** & **Values (\%)** \\ \hline Accuracy & 95.23 \\ \hline Sensitivity & 97.98 \\ \hline Specificity & 92.76 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Accuracy, Sensitivity, and Specificity of the bagging ensemble strategy.  
Finally, another ensemble was trained by setting the method to be a boosting algorithm with decision tree learners. The training and cross-validation strategy was the same as the previous experiments. Table 3 recaps the results obtained:  
The results obtained in this last experiment are similar to those obtained with the previous one with slightly lower values in terms of accuracy and sensitivity and a slightly higher specificity value. Moreover, in this experiment, we notice a greater balance between the sensitivity and specificity metrics.