Abstract
Spam refers to the unsolicited and repetitive sending of messages to others via electronic devices without their consent. This activity, commonly known as spamming, is typically carried out by individuals referred to as spammers. SMS spam, which often originates from unknown sources, frequently contains advertisements, phishing attempts, scams, and even malware. Such spam messages can be pervasive, affecting almost all mobile phone numbers, thereby causing significant disruptions to communication by delivering irrelevant content. The persistent nature of spam messages underscores the need for effective filtering mechanisms. This study investigates the application of the K-Nearest Neighbors (KNN) algorithm for classifying SMS messages as either spam or non-spam (ham). The findings demonstrate that KNN, when optimized through various methods for determining the appropriate value of K, can achieve an impressive average accuracy of 99.16% in classifying SMS spam. This high level of accuracy indicates that KNN is a reliable method for spam detection.
Keywords
Article Details
How to Cite
Citation FormatReferences
15 References- Nanja, M., & Purwanto, P. (2015). Metode K-Nearest Neighbor berbasis forward selection untuk prediksi harga komoditi lada. Pseudocode, 2(1), 53–64. https://doi.org/10.33369/pseudocode.2.1.53-64
- Jain, G., Sharma, M., & Agarwal, B. (2019). Optimizing semantic LSTM for spam detection. International Journal of Information Technology, 11, 239-250. https://doi.org/10.1007/s41870-018-0157-5.
- Jindal, N., & Liu, B. (2007, May). Review spam detection. In Proceedings of the 16th international conference on World Wide Web (pp. 1189-1190).
- Jiang, M., Cui, P., & Faloutsos, C. (2016). Suspicious behavior detection: Current trends and future directions. IEEE intelligent systems, 31(1), 31-39. https://doi.org/10.1109/MIS.2016.5.
- Roul, R. K., Sahoo, J. K., & Arora, K. (2018). Modified TF-IDF term weighting strategies for text categorization. In 2017 14th IEEE India Council International Conference (INDICON) (no. October). https://doi.org/10.1109/INDICON.2017.8487593
- Martha, M., Christanti, V., Naga, D. S., & Rompas, P. T. D. (2018). Perbandingan Pengklasifikasi k-Nearest Neighbor dan Neighbor-Weighted k-Nearest Neighbor Pada Sistem Analisis Sentimen dengan Data Microblog. FRONTIERS: JURNAL SAINS DAN TEKNOLOGI, 1(1). https://doi.org/10.36412/frontiers/001035e1/april201801.08
- Irfa, A. A., Adiwijaya, A., & Mubarok, M. S. (2018). Klasifikasi Topik Berita Berbahasa Indonesia Menggunakan k-Nearest Neighbor. eProceedings of Engineering, 5(2).
- Ling, J., Kencana, I. P. E. N., & Oka, T. B. (2014). Analisis sentimen menggunakan metode Naïve Bayes Classifier dengan seleksi fitur Chi Square. E-Jurnal Matematika, 3(3), 92. https://doi.org/10.24843/mtk.2014.v03.i03.p070
- Tamil, N., & Andhra, P. (2020). Classification of social media text spam using VAE-CNN and LSTM mode. Ingénierie des Systèmes d’Information, 25(6), 747-753.
- Widyasanti, N. K., Putra, I. D., & Rusjayanthi, N. D. (2018). Seleksi Fitur Bobot Kata dengan Metode TFIDF untuk Ringkasan Bahasa Indonesia. J. Ilm. Merpati (Menara Penelit. Akad. Teknol. Informasi), 6(2), 119.
- Zuviyanto, E., Adji, T. B., & Setiawan, N. A. (2018). Perbandingan Algoritme-algoritme Pembelajaran Mesin pada Klasifikasi SMS Spam. Prosiding SENIATI, 4(3), 20-26. https://doi.org/10.36040/seniati.v4i3.1350.
- Muzakki, M. A. (2020). Klasifikasi dan Analisa Sentimen Kuesioner Fasilitas dan Layanan untuk Universitas Qomaruddin Gresik. Journal of Computer Science and Visual Communication Design, 5(2), 68-76.
- Ramadhan, R., Sari, Y. A., & Adikara, P. P. (2021). Perbandingan Pembobotan Term Frequency-Inverse Document Frequency dan Term Frequency-Relevance Frequency terhadap Fitur N-Gram pada Analisis Sentimen. Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, 5(11), 5075-5079.
- Herwijayanti, B., Ratnawati, D. E., & Muflikhah, L. (2018). Klasifikasi Berita Online dengan menggunakan Pembobotan TF-IDF dan Cosine Similarity. Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, 2(1), 306-312.
- Pramartha, G. S., Shaufiah, S., & Bijaksana, M. A. (2015). Analisis Dan Implementasi Algoritma Graph-basedk-nearest Neighbour Untuk Klasifikasi Spam Pada Pesan Singkat. eProceedings of Engineering, 2(2).
License
Copyright (c) 2024 Ferryma Arba Apriansyah, Arief Hermawan, Donny Avianto

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
This is an open-access journal distributed under the Creative Commons Attribution 4.0 International License (CC BY 4.0), which permits unrestricted use, distribution, reproduction, and adaptation in any medium (even commercially), provided appropriate credit is given to the original author(s), a link to the license is provided, and any changes made are indicated. Authors retain copyright without restrictions and grant the journal the right of first publication as well as non-exclusive publishing rights for archiving, indexing, and scholarly dissemination.
Downloads
OJS UsageStats PluginSimilar Articles
- WebGIS-Based K-Nearest Neighbor Classification for Agricultural Land Suitability Assessment Across Multiple Commodities in Curah Kalak Village, Situbondo Regency Moh. Alfian Husni Mubarok, A. Hamdani, Adi Susanto · International Journal Software Engineering and Computer Science (IJSECS) · Vol. 6 No. 2 (2026): AUGUST 2026
- Classification of Potential Tsunami Disaster Due to Earthquakes in Indonesia Based on Machine Learning Eri Mardiani, Nur Rahmansyah, Sari Ningsih, Dhieka Avrilia Lantana, Nabila Puspita Wulandana, Azzaleya Agashi Lombu, Sisca Budyarti · International Journal Software Engineering and Computer Science (IJSECS) · Vol. 4 No. 1 (2024): APRIL 2024
- Sentiment Analysis of BMKG Weather Information Service Using K-Nearest Neighbor Method Muhamad Fajar Sodiq, Fatkhul Amin · International Journal Software Engineering and Computer Science (IJSECS) · Vol. 4 No. 2 (2024): AUGUST 2024
- Design of a Student Thesis Topic Recommendation System Using the K-Nearest Neighbor Algorithm Abiil Maazzalla, Eza Budi Perkasa · International Journal Software Engineering and Computer Science (IJSECS) · Vol. 6 No. 2 (2026): AUGUST 2026
- Analysis and Implementation of a Hybrid Case-Based Reasoning and K-Nearest Neighbor Approach for Chronic Kidney Disease Prediction Hananing Sumaningdiah Larasati, Shella Sukma Dewi Waramena, Wulan Pahira · International Journal Software Engineering and Computer Science (IJSECS) · Vol. 6 No. 1 (2026): APRIL 2026
You may also start an advanced similarity search for this article.
Most read articles by the same author(s)
- A Comparison of Product Weight Method and Simple Addition Weight Method in Employee Selection System Adie G. Alwani, Donny Avianto · Vol. 3 No. 3 (2023): DECEMBER 2023
Recommended Articles
Journal Transparency
Additional InformationLearn more about how this journal ensures quality, ethics, and transparency.