Klasifikasi Spam SMS Menggunakan Naïve Bayes Classifier dan K-Nearest Neighbors
DOI:
https://doi.org/10.24252/msa.v13i1.46192Keywords:
NBC, KNN, Classification, training and testing, SMS Spam, accuracy, term frequencyAbstract
This research discusses the classification of the SMS Spam dataset. Indonesia is in 19th position for the most SMS spam in the world. Many fraudulent crimes that cause losses to users come from SMS spam. SMS spam classification can be done using machine learning methods, namely Naïve Bayes Classifier (NBC) and K-Nearest Neighbor (KNN) using term frequency word weighting. This research aims to determine the performance of SMS spam classification using the NBC algorithm and the KNN algorithm. This research shows that the classification accuracy using the Naïve Bayes Classifier method is greater, namely 98.3% compared to the K-Nearest Neighbor method with an accuracy of 95.1% with an accuracy ratio of 1.033, which shows that the Naïve Bayes Classifier method has better performance.
References
Herwanto, N. L. Chusna and M. S. Arif, "Klasifikasi SMS Spam Berbahasa Indonesia Menggunakan Algoritma Multinomial Naïve Bayes," JURNAL MEDIA INFORMATIKA BUDIDARMA, vol. 5, no. 4, 2021.
B. Indiarto, "Klasifikasi SMS Spam Dengan Metode Naive Bayes Classifier Untuk Menyaring Pesan Melalui Selular," Jurnal TELEMATIKA MKOM, vol. 8, no. 2, 2016.
D. N. Fitriana, N. A. Setifani and A. Yusuf, "Perbandingan Algoritma Naïve Bayes, Svm, Dan Decision Tree Untuk Klasifikasi SMS Spam," JUSIM (Jurnal Sist. Inf. Musirawas), vol. 5, no. 2, 2020.
A. S. Dharma, O. . Y. Silitonga and . H. J. Manurung, "Perbandingan Algoritma Naive Bayes, ID3 dan TAN Pada Klasifikasi SMS Spam," J. Marit. Educ, vol. 1, no. 2, 2019.
M. A. Muslim, B. Prasetiyo, E. L. H. Mawarni, A. J. Herowati, Mirqotussa'adah, S. H. Rukmana and A. Nurzahputra, Data Mining Algoritma C4.5 Disertai contoh kasus dan penerapannya dengan program computer, Semarang, 2019.
J. Suntoro, Data Mining Algoritme dan Implementasi Menggunakan Bahasa Pemograman PHP, Semarang, 2018.
A. Firdaus and W. I. Firdaus, "Text Mining dan Pola Logoritma dalam Penyelesaian Masalah Informasi: (Sebuah Ulasan)," Jurnal JUPITER, vol. 13, no. 1, 2021.
D. . W. B and A. Hetami, "Perancangan Information Retrieval (IR) untuk Pencarian Ide Ppkok Teks Artikel Berbahasa Inggris dengan Pembobotan Vector Space Model," Jurnal Ilmiah Teknologi dan Informasi ASIA, vol. 9, no. 1, 2015.
W. Sulistyo, "Klasifikasi Dokumen Berbahasa Inggris Berdasarkan Weighted-Term," Jurnal Teknologi Informasi-Aiti, vol. 5, no. 1, 2008.
Widyawati and Sutanto, "Perbandingan Kinerja Variasi Naive Bayes Multivariate Bernoulli dan Naive Bayes Multinomial Dalam Pengklasifikasian Dokumen Teks," JURNAL OF INNOVATION AND FUTURE TECKHNOLOGY, vol. 2, no. 1, 2020.
O. S. Y. Prakasa and K. M. Lhaksamana, "Klasifikasi Teks dengan Menggunakan Algoritma K-Nearest Neighbors pada Kasus Kinerja Pemerintah di Twitter," e-Proceeding of Engineering, vol. 5, no. 3, 2018.
A. Deolika, K. and E. . T. Luthfi, "Analisis Pembobotan Kata Pada Klasifikasi Text Mining," JTI (Jurnal Teknologi Informasi), vol. 3, no. 2, 2019.
Pratama, A. Gumilar, Anton and Firmansyah, "Implementasi Aplikasi Enkripsi Short Message Service (SMS) Berbasis Android," JURNAL TEKNIK KOMPUTER AMIK BSI, vol. 1, no. 1, 2015.
A. Zuliharti, Klasifikasi Spam Pada Konten SMS Menggunakan Metode Naive Bayes dengan Featur Selection Document Frequency Thresholding, Malang: Universitas Brawijaya, 2012.
Sandag and G. Arther, "Klasifikasi SMS Spam Menggunakan Algoritma Support Vector Machine (SVM)," Seminar Nasional Sistem Informasi dan Teknologi Informasi 2018, 2018.
F. R. Nasution, Shaufiah and M. A. Bijaksana, "SMS Classification Deteksi Spam dengan menggunakan Algoritma Artificial Immune System dan Apriori Frequent Itemset," eProceedings of Engineering, vol. 2, no. 3, 2015.
T. H. A. Sugianto and C. Agus, "Analisis Komparasi Machine Learning Pada Data Spam SMS," TEDC, vol. 12, no. 1, 2018.
R. D. H. Lumbantobing, E. M. Manalu, D. S. P. Sitinjak and T. W. Manurung, "Rancangan Aplikasi Mobile Pendeteksi Spam SMS di Indonesia," jurnaltio, vol. 2, no. 1, 2021.
J. Na’am, "Pembobotan Kata SMS Spam," Jurnal Ilmiah Media SISFO, vol. 9, no. 2, 2015.
K. S. Berberian, Introduction to Hilbert Space, New York: Oxpord University Press, 1961.
Dwijanto, Analisis Real, Semarang: IKIP Semarang Press, 1994.
E. Kreyzeq, Introduction Functional Analysis with Application, Canada: John Wiley & Son, 1978.
T. P. Nababan, Teorema Titik Tetap di Ruang Metrik dan Aplikasinya, Bandung: Institut Teknologi Bandung, 1992.
B. I, "Groups DCS," 13 Mei 2008. [Online]. Available: http://www.group.dcs.stand.ac.uk. [Accessed 13 Mei 2011].
M. Bulmer and Carter, M, Integer Programming with Mathematica, USA: Inc. USA, 1996.
J. A. 2. Bychmann, Introduction to Cryptography, New York: Inc. USA, 2000.
G. Ginan, "Teori Bilangan dalam Persamaan Diophantine Journal," Teknik Elektro dan Informatika, 2008.
A. Setiawan, Pengantar Teori Probabilitas, Salatiga: Tisara Grafika, 2015, pp. 25-26.
Noeryanti, Pengantar Teori Probabilitas Edition One, Yogyakarta: AKPRIND Press, 2021, p. 21.
Irwan, "perancangan Aplikasi SMS (Short Message Service) dengan Enskripsi Teks Menggunakan Algoritma Block Cipher Aes (Advanced Encryption Standard) Berbasis Mobile Pada Platform Android," Jurnal Sistem dan Teknologi Informasi, vol. 1, no. 1, 2013.
M. Shihab, Tafsir Al-Misbah: Pesan, Kesan, dan Keserasian Al-Qur'an (Vol. 13), Jakarta: Lentera Hati, 2002.
S. A. Hasanah, "Larangan Membicarakan Semua yang didengar," 30 03 2020. [Online].
Butar and Ricky Kristian, "Implementasi dan Analisis Klasifikasi Spam Pada Pesan Singkat Seluler Dengan Pendekatan Collaborative Filtering Menggunakan Naïve Bayes," vol. 2, no. 3, 2015.
A. N. Fajar, "Pemanfaatan Teknologi SMS (Short Message Service) Dalam Instituti Perguruan Tinggi," Jurnal FASILKOM, vol. 4, no. 1, 2006.
J. Brown, B. Shipman and R. Vetter, "SMS: The Short Message Service," ResearchGate, 2007.
H. Muhamad, C. A. Prasojo, N. A. Sugianto, L. Surtiningsih and I. Cholissodin, "Optimasi Naive Bayes Classifier dengan Menggunakan Particle Swarm Optimiation Pada DataIRIS," Jurnal Teknologi Informasi dan Ilmu Komputer (JTIIK), vol. 4, no. 3, 2017.
A. Wahid, M. Baharulloh, R. Kahfiansyah, T. Abrilianto, A. Saifudin and S. Mulyati, "Identifikasi SMS Spam Menggunakan Metode Naive Bayes," Jurnal Informatika Universitas Pamulang, vol. 6, no. 3, 2021.
R. J. Mooney., "CS 391L: Machine Learning Text Categoriation," 2006.
Lajnah Pentashih Mushaf Al-Qur'an Departemen Agama RI, Al-Qur'an dan Teremahnya, Fajar Mulya.
A. Saleh, "Implementasi Metode Klasifikasi Naive Bayes dalam Memprediksi Besarnya Penggunaan Listrik Rumah Tangga," Citec Journal, vol. 2, no. 3, 2015.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Jurnal MSA ( Matematika dan Statistika serta Aplikasinya)

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
Copyright Notice
Jurnal MSA (Matematika dan Statistika serta Aplikasinya)
Authors who publish in Jurnal MSA agree to the following copyright and licensing terms.
1. Copyright Ownership
Authors retain copyright in their scholarly articles unless copyright is lawfully held by another authorized rights holder.
Publication in Jurnal MSA does not require an exclusive transfer or assignment of copyright ownership to the journal or its publisher.
2. Non-Exclusive Publishing Rights
Authors or authorized copyright holders grant Jurnal MSA non-exclusive rights of first journal publication, dissemination, indexing, and digital preservation.
These rights allow the journal to publish, reproduce, distribute, archive, and preserve the accepted scholarly article without transferring copyright ownership.
3. Publication License
Jurnal MSA adopts and applies the Creative Commons Attribution 4.0 International License (CC BY 4.0) as the standard license for scholarly articles published under its current publication terms.
Authors or authorized rights holders authorize publication of their articles under CC BY 4.0.
This license permits sharing, reproduction, redistribution, adaptation, and reuse, including commercial reuse, subject to the license terms and attribution requirements.
Official License:
https://creativecommons.org/licenses/by/4.0/
4. Non-Commercial Publishing Model
Jurnal MSA operates as a non-commercial scholarly publisher dedicated to education, scientific research, and scholarly communication.
The journal's non-commercial status does not restrict commercial reuse of articles licensed under CC BY 4.0.
5. Authors' Rights and Self-Archiving
Authors retain their applicable rights to reuse, share, and disseminate their scholarly works.
Authors may immediately deposit and distribute the published version of their CC BY 4.0-licensed articles through institutional repositories, disciplinary repositories, and academic websites without an embargo imposed by the journal.
Such distribution remains subject to the applicable license and third-party rights.
6. Author Consent and Third-Party Rights
By agreeing to publication, the corresponding author confirms that:
-
All listed authors have approved the manuscript and the publication arrangements.
-
The authors or authorized rights holders possess the legal authority necessary to authorize publication and licensing.
-
Jurnal MSA is granted the necessary non-exclusive publishing rights.
-
Publication of the article under CC BY 4.0 is authorized.
-
Required permissions for third-party materials have been obtained, and any licensing exclusions have been clearly identified.
7. Previously Published Articles
Articles published before the implementation of the current licensing policy remain governed by their validly applicable copyright and licensing arrangements.
The adoption of CC BY 4.0 does not automatically change licenses previously granted under different terms.
Copyright and License Statement
Copyright © [Year], The Author(s).
The author(s) retain copyright and grant Jurnal MSA non-exclusive rights of first publication, dissemination, indexing, and preservation.
This article is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).