# Classification of Cyber-Aggression Cases Applying Machine Learning
## 5 Results
### Results with OneR  
As Table 5 shows, we found an average frequency of terms for VS aggression of 13.41, 21.61 for VM, and 18.60 for R. This means that for example in VS, terms appear 13.41 times as an average, where the most frequent term is \"mar*c*nes\", with 29 appearances. In VM, terms appear 21.61 times as an average, the most frequent term being \"vieja\" with 76 appearances. Finally, in R, terms appear 18.60 times as an average, with \"negros\" as the most frequent with 63 appearances. We show the selected terms in the same table, i.e., those with a frequency of appearance greater than the average frequency of appearance of all the terms. Figure 5, known as word clouds, show the importance of the terms for each type of aggression. The bigger the term in the figure, the more relevant it is. These pictures match the terms shown in Table 5. As expected, the most common offensive terms in Spanish are present. The most common offensive words are \"maric*nes\", \"asco\", \"put*s\", \"gays\", \"gay\", \"mi*rda\" for VS; \"vieja\", \"pinch*\", \"mujeres\", \"put*\", \"viejas\", \"pinch*s\" for VM, and \"negros\", \"mi*rda\", \"indio\", \"negro\", \"judios\", \"musulmanes\" for R. We used the terms from Table 5 as input to OneR classifier to build the classification models for each cyber-aggression case. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Case** & **Accuracy** & **Balanced Accuracy** & **Sensitivity** & **Specificity** \\ \hline R & 0.9030 & 0.9237 & 0.6783 & 0.9883 \\ sd & 0.0129 & 0.0129 & 0.0466 & 0.0060 \\ VS & 0.8036 & 0.8313 & 0.5320 & 0.9591 \\ sd & 0.0162 & 0.0203 & 0.0355 & 0.0115 \\ VM & 0.8204 & 0.8233 & 0.6325 & 0.9261 \\ sd & 0.0148 & 0.0187 & 0.0311 & 0.0165 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Results of comment classification. Standard deviation (sd) is also shown. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Case** & **Average Frequency of Terms** & **Selected Terms (Quantitiy)** \\ \hline VS & 13.41 & maric*nes, asco, put*s, gays, gay, mi*rda, \\  & & hombres, pinch*s, jot*s, maric*s, dios, mundo, \\  & & gentle, homosexuales, ser, respeto, put* (17) \\ \hline VM & 21.61 & vieja, pinch*, mujeres, put*, viejas, pinch*s, \\  & & bien, muijer, p*nd*ja, put*s, solo, asi (12) \\  & & negros, mi*rda, indio, negro, judios, musulmanes, \\ \hline R & 18.6 & malditos, p*nd*ejo, mexicanos, pinch* (10) \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Selected terms by their average frequency for each type of aggression. Table 6 shows the classification results with OneR using only the most relevant terms found, as described in the Experimental Procedure section. We show the results averaged over 30 independent runs. We also show the standard deviation (sd). We found an accuracy above 0.90 for all types of aggression. Moreover, all metrics reached 0.90 in most cases. Results prove the efficiency of the methodology applied. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Case** & **Accuracy** & **Balanced Accuracy** & **Sensitivity** & **Specificity** & **Kappa** \\ \hline R & 0.9623 & 0.9569 & 0.9712 & 0.9426 & 0.9119 \\ sd & 0.0080 & 0.0103 & 0.0071 & 0.0184 & 0.0188 \\ VS & 0.9525 & 0.9192 & 0.8383 & 1.0000 & 0.8795 \\ sd & 0.0102 & 0.0174 & 0.0348 & 0.0000 & 0.0274 \\ VM & 0.9545 & 0.9615 & 0.9274 & 0.9957 & 0.9066 \\ sd & 0.0099 & 0.0112 & 0.0138 & 0.0237 & 0.0206 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Classification results using only the most relevant terms for each type of aggression. The results are shown averaged over 30 runs. Standard deviation (sd) is also shown. Figure 5: Word clouds for each cyber-aggression case. (**a**) Violence based on sexual orientation (VS). (**b**) Violence against women (VM). (**c**) Racism (R). In Table 7, we show the best classification rule generated by OneR for each type of aggression. Also, the number of correctly classified instances and the balanced accuracy in the test set represents the effectiveness of each rule.