## 5 Experimental Results and Discussion
### Second Layer: Systematic Classification of Hate Speech Types  
In the second layer of our hate speech classification system, the predictions of the best performing model in the first layer, CNN, are used to classify hate speech into specific types. The predictions of each fold in the first layer are used as inputs for that layer, with non-hate speech texts filtered out to refine the results. This section evaluates the performance of different machine learning and deep learning models in classifying these types of hate speech, using different feature representations to improve the accuracy and effectiveness of the classification process. As shown in Table 6, Figures 8-10, logistic regression (LR) achieved the best performance, with an accuracy of 75.58% and an F1 score of 72.31% using a combination of word and character N-grams, demonstrating the effectiveness of this feature set in capturing nuanced patterns in hate speech. The support vector machine (SVM) also performed well, achieving 73.99% accuracy and a 72.13% F1 score with the same features, showcasing its robustness. In contrast, naive Bayes (NB) struggled with word N-grams alone, achieving an F1 score of just 53.19%, but improved with character N-grams, reaching 74.13% accuracy and a 68.33% F1 score. Overall, the results highlight the importance of combining word and character N-grams to enhance model performance, with LR and SVM emerging as the most reliable models for hate speech classification. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & & \multicolumn{4}{c}{**Metrics**} \\ \hline
**Model** & **Features** & **Accuracy** & **Precision** & **Recall** & **F1 Score** \\ \hline \multirow{3}{*}{**LR**} & **Word-N-grams** & **71.1** & **74.39** & **62.81** & **64.84** \\  & **Char-N-grams** & **74.91** & **77.11** & **69.04** & **71.35** \\  & **Word + Char-N-grams** & **75.58** & **77.61** & **70.04** & **72.31** \\  & **Word-N-grams** & 72.22 & 74,34 & 66.59 & 68.83 \\  & **Char-N-grams** & 75.09 & 76.21 & 70.9 & 72.76 \\  & **Word + Char-N-grams** & 73.99 & 74.15 & 70.8 & 72.13 \\  & **Word-N-grams** & 68.02 & 75.76 & 55.09 & 53.19 \\  & **Char-N-grams** & 72.58 & 78.04 & 63.43 & 65.38 \\  & **Word + Char-N-grams** & 74.13 & 77.89 & 66.07 & 68.33 \\  & **Word-N-grams** & 69.77 & 73.32 & 62.55 & 64.76 \\  & **Char-N-grams** & 71.05 & 73.28 & 64.38 & 66.55 \\  & **Word + Char-N-grams** & 71.66 & 74.14 & 65.27 & 67.52 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Evaluation of the performance of different machine learning and deep learning models in classifying types of hate speech, using different feature representations to improve the accuracy and effectiveness of the classification process. Figure 7: Precision–recall (PR) curve for a repetition of the experiment with different deep learning models for the first layer (AraBERT pretrained embeddings). Figure 8: Evaluation of the performance of different machine learning and deep learning models (Word-N-grams feature). Figure 10: Evaluation of the performance of different machine learning and deep learning models (Word + Char-N-grams feature). Figure 9: Evaluation of the performance of different machine learning and deep learning models (Char-N-grams feature). The evaluation results in Table 7, Figures 11-13 illustrate our experiments with deep learning models for hate speech classification and show that CNN is the most effective model. CNN achieved the highest accuracy of 93.23% with trainable embeddings and 93.33% with pre-trained embeddings and F1-scores of 91.93% and 92.36%, respectively. These results highlight CNN's ability to effectively capture local text features and patterns using convolutional filters and demonstrate its adaptability and consistency across different embedding types. AraBERT also performed well, particularly with pre-trained embeddings, achieving an accuracy of 84.29% and an F1 score of 84.15%, highlighting its strength in processing nuanced speech and contextual information.