# An Explainable Artificial Intelligence Model for Detecting Xenophobic Tweets
## 6 Experimental Results and Discussion
### Classification Results  
Using the methodology proposed in Section 5, we can analyze the classification results obtained on both EXD and PXD databases. Figure 6 show box-and-whisker plots for both databases regarding AUC and F1 score metrics. The box-and-whiskers plot, also known as a boxplot, is a chart used in descriptive data analysis [108]. \begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline \multirow{2}{*}{**Database**} & \multicolumn{3}{c}{**Before Cleaning Method**} & \multicolumn{3}{c}{**After Cleaning Method**} \\  & **No Xenophobia** & **Xenophobia** & **Total** & **IR** & **No Xenophobia** & **Xenophobia** & **Total** & **IR** \\ \hline PXD & 3971 & 2114 & 6085 & 1.88 & 3826 & 1988 & 5814 & 1.92 \\ EXD & 8056 & 2017 & 10,073 & 3.99 & 8054 & 2003 & 10,057 & 4.02 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Comparison between the number of tweets belonging to the non-xenophobic and xenophobic classes before and after using the cleaning method. The class imbalance ratio (IR) is calculated as the proportion between the number of objects belonging to the majority class and the number of objects belonging to the minority class [36]. The higher the IR value, the more imbalanced the database is. \begin{table}
\begin{tabular}{c c c} \hline \hline \multicolumn{3}{c}{**(a) Characteristics of the classifiers.**} \\ \hline \multicolumn{2}{c}{**Classifier**} & **Is interpretable?** & **Is it contrast pattern-based?** \\ \hline C4S & ✓ & ✗ \\ KNN & ✗ & ✗ \\ RUS & ✓ & ✗ \\ UND & ✓ & ✗ \\ PBC4 cip & ✓ & ✓ \\ \hline \hline \multicolumn{3}{c}{**(b) Interpretability of the feature representations.**} \\ \hline
**Feature representation** & **Is interpretable?** \\ \hline BOW & ✗ \\ TFIDF & ✗ \\ W2V & ✗ \\ INTER & ✗ \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Summary of the characteristics of the classifiers and the interpretability of the feature representations. The boxplots are very useful to compare the distribution between many groups where each box of the boxplot represents the distribution of a group. In our case, each box represents the combination's results for both AUC and F1 score metrics presented in Table 9. Boxplots show the next five-number summary of a group:  
* **The minimum score:** is the lowest score present in the set, excluding outliers. In the chart, it is represented as the line below the box. * **Lower quartile:** also known as the first quartile or Q1, the lower quartile is a line where 25% of the scores fall below this value. In the chart, it is represented as the bottom line of the box. * **Median**: also known as second quartile or Q2, the median is a line where half of the scores are less than this value, and half are greater. In the cart, it is represented as the middle line of the box. * **Upper quartile:** also known as third quartile or Q3, the upper quartile is a line where 75% of the scores fall below this value. In the chart, it is represented as the upper line of the box. * **Maximum score**: is the highest score present in the set, excluding outliers. In the chart, it is represented as the line above the box. Figure 6: Box-and-whisker plots for the AUC and F1 score metrics. The boxes are sorted in ascending order according to their median. In Figure 6, the best combination of embedding method and classifier is the one that has more score in the median. On the one hand, in Figure 6a, when EXD is used, the combination with a higher median is BOW+C45 for both AUC and F1 metric scores. On the other hand, Figure 6b shows that for PXD, the best combination is TFIDF+P4C. It is worth mentioning that the best combinations of embedding methods and classifiers that maximize the AUC and F1 score results for EXD and PXD are not interpretable. Taking into account all the interpretable combinations that are presented in the Table 8 and comparing their results presented in Figure 6, we can see that for both databases, the combination INTER+P4C is the one providing the best score metric results.