Cover Image

Comparison Support Vector Machine and Naive Bayes Methods for Classifying Cyberbullying in Twitter

Nur Chamidah, Reiza Sahawaly


Twitter users in Indonesia in 2019 were recorded at 6.43 million. The high level of Twitter users makes it allows for free opinion to anyone, it can cause cyberbullying. Victims of cyberbullying experienced higher levels of depression than other verbal acts of violence. The forms of cyberbullying that occurs on Twitter are Flamming, Denigration, and Body Shaming. The research contribution is able to make social media developers and users more aware of the type of cyberbullying that social media users sometimes do without realizing it. Social media developers can prevent cyberbullying by using policies such as word detection and filtering features that indicate cyberbullying more accurately by classifying it by type and using the most accurate method. To classify cyberbullying forms in twitter, in this study we use the Naïve Bayes method and Support Vector Machine (SVM) and compare them based on classification accuracy. This research will also identify words that are characteristic of each category of cyberbullying so that each category is easy to identify by social media users and makes it easier to avoid cyberbullying. The results of this study are the classification accuracy of Naïve Bayes of 97.99% and the classification accuracy of SVM of 99.60%. It means that SVM is better than Naïve Bayes for classifying the forms of cyberbullying in Twitter.


Cyberbullying; Twitter; Naïve Bayes; Support Vector Machine; K-Fold Cross Validation

Full Text:



J. G. Green, "Using School Disciplinary Context to Understand Adolescent Health Behaviors," in Journal of Adolesc Health, vol. 62, no. 2, pp. 126-127, 2018.

E. L. Meneses, E. V. Cano, M. D. G. Zamar, and E. A. Segura, "Socioeconomic Effects in Cyberbullying: Global Research Trends in the Educational Context," in International Journal of Environmental Research and Public Health, vol. 17, no. 12, p. 4369, 2020.

N. Kurniawati, E. H. Maolida and A. G. Anjaniputra, "The praxis of digital literacy in the EFL classroom: Digital immigrant vs digital-native teacher," in Indonesian Journal of Applied Linguistics, vol. 8, no. 1, pp. 28-37, 2018.

Wearesocial, Global Digital Report 2019, 2019.

K. Kircaburun, P. Jonason, M. D. Griffiths, E. Aslanargun, E. Emirtekin, S. B. Tosuntas, and J. Billieux, "Childhood Emotional Abuse and Cyberbullying Perpetration: The Role of Dark Personality Traits," in Journal of Interpersonal Violence, pp. 1–17, 2019.

M. Zhong, X. Huang, E. S. Huebner, and L. Tian, "Association between bullying victimization and depressive symptoms in children: The mediating role of self-esteem," Journal of Affective Disorders, vol. 294, pp. 322-328, 2021.

S. A. Hemphill, J. A. Heerde, and K. E. Scholes-Balog, "Risk factors and risk-based protective factors for violent offending: A study of young Victorians," in Journal of Criminal Justice, vol. 45, pp. 94–100, 2016.

S.H. Bong, K. M. Kim, K. H. Seol, and J. W. Kim, "Bullying perpetration and victimization in elementary school students diagnosed with attention-deficit/hyperactivity disorder," Asian Journal of Psychiatry, vol. 62, p. 102729, 2021.

D. Yoon, S. L. Shipe, J. Park, and M. Yoon, "Bullying patterns and their associations with child maltreatment and adolescent psychosocial problems," Children and Youth Services Review, vol. 129, p. 106178, 2021.

C. Liu, Z. Liu, and G. Yuan, "The longitudinal influence of cyberbullying victimization on depression and posttraumatic stress symptoms: The mediation role of rumination," Archives of Psychiatric Nursing, vol. 34, Issue 4, pp. 206-210, 2020.

S. Yubero, R. Navarro, M. Elche, E. Larrañaga, and A. Ovejero, "Cyberbullying victimization in higher education: An exploratory analysis of its association with social and emotional factors among Spanish students," Computers in Human Behavior, vol. 75, pp. 439-449, 2017.

Y. Peled, "Cyberbullying and its influence on academic, social, and emotional development of undergraduate students," in Heliyon, vol. 5, no. 3, p. e01393, 2019.

S. Bauman, Cyberbullying: What Counselors Need to Know, John Wiley & Sons, 2014.

L. K. Watts, J. Wagner, B. Velasquez, and P. I. Behrens, "Cyberbullying in higher education: A literature review," Computers in Human Behavior, vol. 69, pp. 268-274, 2017.

J. P. Chaplin, Dictionary of Psychology, Rajawali Press, Jakarta, 2005.

R. Feldman, and J. Sanger, The Text Mining Handbook: Advanced Approaches in Analyzing Unstructured Data, Cambridge University Press, New York, 2007.

A. Tripathy, A. Agrawal, and K. R. Santanu, "Classification of sentiment reviews using n-gram machine learning approach - Expert Systems with Applications," Expert Systems with Applications, vol. 57, pp. 117–126, 2016.

S. Pramana, B. Yuniarto, S. Mariyah, I. Santoso, and R. Nooraeni, Data Mining dengan R, IN MEDIA, Bogor, 2018.

H. T. Sueno, B. D. Gerardo, and R. P. Medina, "Multi-class Document Classification using Support Vector Machine (SVM) Based on Improved Naïve Bayes Vectorization Technique," International Journal of Advanced Trends in Computer Science and Engineering, vol. 9, no 3, 2020.

M. Fortunatusa, P. Anthonya, and S. Charters, "Combining textual features to detect cyberbullying in social media posts," 24th International Conference on Knowledge-Based and Intelligent Information & Engineering Systems, Procedia Computer Science vol. 176, pp. 612–621, 2020.

M. A. Al-garadi, K. D. Varathan, and S. D. Ravana, "Cybercrime detection in online communications: The experimental case of cyberbullying detection in the Twitter network," Computers in Human Behavior, vol. 63, pp. 433-443, 2016.

M. Bramer, Principles of Data Mining. Springer-Verlag, London, 2007.

Y. B. N. D. Artissal, I. Asror, and S. A. Faraby, "Personality Classification based on Facebook Status Text Using Multinomial Naïve Bayes Method," The 2nd International Conference on Data and Information Science, IOP Conf. Series: Journal of Physics: Conf. Series 1192, 012003, 2019.

A. A. Bimantara, A. Larasati, E. M. Risondang, M. Z. Naf'an, and N. A. S. Nugraha, "Sentiment Analysis of Cyberbullying on Instagram User Comments," in Journal of Data Science and Its Applications, vol. 2, no. 1, pp. 38-48, 2019.

J.-Q. Zhu, A. N. Sanborn, and N. Chater, "The Bayesian Sampler: Generic Bayesian Inference Causes Incoherence in Human Probability Judgments," Psychological Review, vol. 127, no. 5, pp. 719-748, 2020.

T. M. Mitchell, Machine Learning, McGraw-Hill Science/Engineering/Math, 1997.

L. Yang, and H. Dong, "Support Vector Machine with Truncated Pinball Loss and its Application in Pattern Recognition," in Chemometrics and Intelligent Laboratory Systems, vol. 177, pp. 89-99, 2018.

M. U. Hasan, S. Ullah, M. J. Khan, and K. Khurshid, "Comparative Analysis of SVM, ANN and CNN for Classifying Vegetation Species Using Hyperspectral Thermal Infrared Data," The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, vol. XLII-2/W13, pp. 1861-1868, 2019.

S. R. Gunn, Support Vector Machine for Classification and Regression, Southampton: University of Southampton, 1998.

L. S. Meyers, G. Glenn, and A. J. Guarino, Applied Multivariate Research, 3rd edition, SAGE Publication, United States of America, 2016.



  • There are currently no refbacks.

Copyright (c) 2021 Nur - Chamidah

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

About the JournalJournal PoliciesAuthor Information

Jurnal Ilmiah Teknik Elektro Komputer dan Informatika
ISSN 2338-3070 (print) | 2338-3062 (online)
Organized by Electrical Engineering Department - Universitas Ahmad Dahlan
Published by Universitas Ahmad Dahlan
Email 1:
Email 2:
Office Address: Kantor Program Studi Teknik Elektro, Lantai 6 Sayap Barat, Kampus 4 UAD, Jl. Ringroad Selatan, Tamanan, Kec. Banguntapan, Bantul, Daerah Istimewa Yogyakarta 55191, Indonesia