# Automatic Age and Gender Recognition Using Ensemble Learning
## 4 Experimental Evaluation
### Experimental Results
#### 4.3.2 Performances of Ensemble Classifiers  
The ensemble classifiers developed in this study are based on two approaches: majority voting and stacking. While the majority voting classifier combines the predictions of the base-level classifiers according to majority voting, the stacking classifier uses the predictions of the base-level classifiers to train the meta-classifier as shown in Figure 1. In this study, LR was used as a meta-classifier of the stacking ensembles. First, two ensemble models were created by stacking and voting the two base-level classifiers with the highest individual performance. Then, the ensemble models were expanded by increasing the number of the base-level classifiers to three, four, and five, respectively, and the performances of each were evaluated separately. In this process, the base-level classifiers were incorporated into the ensemble models according to their performance orders. The performance metrics of ensemble classifiers developed by majority voting are given in Table 5, and those of stacking are given in Table 6. In both tables, the best results for each metric are highlighted in bold.  
\begin{table}
\begin{tabular}{l l l l l l l l l l l l} \hline \hline  & **F80s** & **F50s** & **M50s** & **F40s** & **M40s** & **F70s** & **F60s** & **M60s** & **F30s** & **M30s** & **F20s** & **M20s** \\ \hline
**F80s** & **98.80** & 0 & 0 & 0 & 0.60 & 0 & 0 & 0 & 0 & 0.60 & 0 & 0 \\
**F50s** & 0 & **94.35** & 0.56 & 0 & 0 & 3.39 & 0 & 0 & 0 & 0 & 1.69 & 0 \\
**M50s** & 0 & 0 & **100** & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
**F40s** & 0 & 0 & 0 & **95.48** & 0 & 0.65 & 0 & 0.65 & 0 & 0.65 & 2.58 & 0 \\
**M40s** & 0 & 0 & 0.66 & 0.66 & **94.70** & 1.32 & 0 & 0.66 & 0 & 1.32 & 0 & 0.66 \\
**F70s** & 0 & 1.27 & 0 & 0 & 0 & **98.73** & 0 & 0 & 0 & 0 & 0 & 0 \\
**F60s** & 0.61 & 0 & 0 & 0.61 & 0 & 0 & **97.56** & 0 & 0 & 0 & 1.22 & 0 \\
**M60s** & 0.65 & 0 & 0 & 0 & 0.65 & 0 & 0.65 & **98.06** & 0 & 0 & 0 & 0 \\
**F30s** & 0 & 0 & 0 & 1.10 & 0 & 0 & 0 & 0 & **97.79** & 0 & 1.10 & 0 \\
**M30s** & 1.19 & 0 & 0 & 0 & 2.38 & 0 & 0 & 0 & 0 & **96.43** & 0 & 0 \\
**F20s** & 0 & 3.83 & 0 & 0.55 & 1.64 & 3.28 & 0 & 0.55 & 3.83 & 0 & **86.34** & 0 \\
**M20s** & 0 & 0 & 0 & 0 & 1.20 & 0 & 0 & 0 & 0 & 0 & 0 & **98.80** \\ \hline \hline \end{tabular}
\end{table}
Table 4: Confusion matrix of the SVM classifier.  
\begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Base-Level Classifier** & **Accuracy** & **Precision** & **Recall** & **F1 Score** \\ \hline KNN & 91.94 & 92.17 & 91.94 & 91.96 \\
**SVM** & **96.37** & **96.39** & **96.37** & **96.35** \\ RF & 95.57 & 95.71 & 95.57 & 95.54 \\ E-TREE & 96.02 & 96.22 & 96.02 & 96.00 \\ LR & 91.59 & 91.57 & 91.59 & 91.53 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Age and gender classification performances of base-level classifiers.  
From Tables 5 and 6, it can be seen that stacking-based ensemble provides superior performance compared to majority voting in terms of all evaluated metrics. Among all the models developed in the study, the ensemble model, created by stacking five base-level classifiers (SVM, E-TREE, RF, KNN, and LR), stands out as the model with the highest accuracy. This model achieves 97.41% accuracy by correctly classifying 1958 of 2010 speeches in the test dataset, and its confusion matrix is given in Table 7. According to this matrix, F80s and M50s are the two classes classified with the highest accuracy with 100% accuracy. On the other hand, F20s with 92.35% and F50s with 92.66% are the two classes with the lowest classification accuracy. Among the models developed based on majority voting, the highest accuracy is 96.72%, and this result is obtained by evaluating the results of the SVM, E-TREE, RF, and KNN classifiers according to majority voting.