Cyberbullying Detection on X (Twitter) Using Support Vector Machine (SVM) and Naïve Bayes (NB)
DOI:
https://doi.org/10.4314/cajost.v7i3.17Keywords:
Cyberbullying, , Twitter, , Machine Learning Algorithm.Abstract
Social media has become part and parcel of our daily lives. Many forms of
cybercrimes continue to emerge as more people join cyberspace. Detecting
cybercrimes not only helps in making cyberspace safe but also safeguards the
health and well-being of internet users, particularly the vulnerable ones. The
proposed system involves multi-classification datasets, which use text to
classify the tweets into six classes. Two supervised machine learning
algorithms, Support Vector Machine (SVM) and Naïve Bayes (NB), are utilised.
The results demonstrate the effectiveness of the Support Vector Machine, with
accuracy, precision, recall, and F1-Score of 83%, 0.82, 0.83, and 0.82,
respectively, compared to Naïve Bayes (NB), which achieved 71%, 0.71, 0.71,
and 0.68 for accuracy, precision, recall, and F1-Score, respectively.
Additionally, the ablation analysis results showed 83.30%, 81.93%, and 83.40%
for feature reduction, bigram, and unigram, respectively, for the Support Vector
Machine. In contrast, for Naïve Bayes (NB), the results were 76.24%, 69.80%,
and 72.07% for feature reduction, bigram, and unigram, respectively. Within the
scope of this study, the Support Vector Machine (SVM) outperformed Naïve
Bayes (NB) in detecting cyberbullying on Twitter, suggesting that SVM may be a
more effective choice for similar text classification tasks under comparable
conditions.