Comparison of K-Nearest Neighbor, Support Vector Machine, Random Forest, and C 4.5 Algorithms on Indoor Positioning System


WIFI access point signals
classification algorithms

How to Cite

Astari, M. R., Nuruzzaman, M. T., & Sugiantoro, B. (2023). Comparison of K-Nearest Neighbor, Support Vector Machine, Random Forest, and C 4.5 Algorithms on Indoor Positioning System. IJID (International Journal on Informatics for Development), 12(1), 302–313.


Today’s most common Positioning System applied is the Global Positioning System (GPS). Positioning System is considered accurate when outdoors, but it becomes a problem when indoors making it difficult to read the GPS signal. Many academics are actively working on indoor positioning solutions to address GPS's drawbacks. Because WiFi Access Point signals are frequently employed in multiple studies, they are used as research material. This study compares the classification algorithms KNN, SVM, Random Forest, and C 4.5 to see which algorithm provides more accurate calculations. The fingerprinting method was employed in the process of collecting signal strength data in each room of the Terpadu Laboratory Building at UIN Sunan Kalijaga using 30 rooms and a total dataset of 5,977 data. The data is utilized to run experiments to determine the location using various methods. According to the experimental data, the Random Forest algorithm achieves an accuracy rate of 83%, C4.5 81%, and KNN 80%, while the SVM method achieves the lowest accuracy rate of 57%.


C. J. Hegarty, “The Global Positioning System (GPS) BT - Springer Handbook of Global Navigation Satellite Systems,” P. J. G. Teunissen and O. Montenbruck, Eds. Cham: Springer International Publishing, 2017, pp. 197–218. doi: 10.1007/978-3-319-42928-1_7.

P. A. Zandbergen, “Accuracy of iPhone locations: A comparison of assisted GPS, WiFi and cellular positioning,” Trans. GIS, vol. 13, no. SUPPL. 1, pp. 5–25, 2009, doi: 10.1111/j.1467-9671.2009.01152.x.

F. H. Perdana and H. Ginardi, “Implementasi Indoor Positioning System Berbasis Smartphone dengan Penambahan Access Point untuk Studi Kasus Gedung Teknik Informatika ITS,” J. Tek. ITS, vol. 5, no. 2, 2016, doi: 10.12962/j23373539.v5i2.17047.

M. G. Wing, A. Eklund, and L. D. Kellogg, “Consumer-grade global positioning system (GPS) accuracy and reliability,” J. For., vol. 103, no. 4, pp. 169–173, 2005, doi: 10.1093/jof/103.4.169.

R. Joseph and S. B. Sasi, “Indoor Positioning Using WiFi Fingerprint,” in 2018 International Conference on Circuits and Systems in Digital Enterprise Technology (ICCSDET), 2018, pp. 1–3. doi: 10.1109/ICCSDET.2018.8821184.

A. H. Lashkari, B. Parhizkar, and M. N. A. Ngan, “WIFI-Based Indoor Positioning System,” in 2010 Second International Conference on Computer and Network Technology, Apr. 2010, pp. 76–78. doi: 10.1109/ICCNT.2010.33.

H. Obeidat, W. Shuaieb, O. Obeidat, and R. Abd-Alhameed, A Review of Indoor Localization Techniques and Wireless Technologies, vol. 119, no. 1. Springer US, 2021. doi: 10.1007/s11277-021-08209-5.

Jamaluddin, A. Tjahjo Nugroho, and W. Maulina, “Rancang Bangun Indoor Positioning System berbasis Wireless Smartphone menggunakan Teknik Global Positioning System dengan Metode Absolut (The Design of An Indoor Positioning System Prototype Using Wireless Smartphone by Modify Absolute Method of The Globa,” vol. 7, no. 1, pp. 13–18, 2019.

S. Subedi and J. Y. Pyun, “A survey of a smartphone-based indoor positioning system using RF-based wireless technologies,” Sensors (Switzerland), vol. 20, no. 24, pp. 1–32, 2020, doi: 10.3390/s20247230.

B. Sugiantoro and M. P. Fawzan, “Rekomendasi Access Point Network pada Fakultas di Lingkungan UIN Sunan Kalijaga Yogyakarta,” JISKA (Jurnal Inform. Sunan Kalijaga), vol. 2, no. 2, pp. 81–92, 2017, doi: 10.14421/jiska.2017.22-03.

S. Bozkurt, G. Elibol, S. Gunal, and U. Yayan, “A comparative study on machine learning algorithms for indoor positioning,” in 2015 International Symposium on Innovations in Intelligent Systems and Applications (INISTA), 2015, pp. 1–8. doi: 10.1109/INISTA.2015.7276725.

A. A. Kristianto, X. B. N. Najoan, and ..., “User Locator System Berbasis BSSID dan Alamat MAC Dalam Lingkungan Jaringan WIFI,” J. Tek. …, vol. 12, no. 1, 2017.

A. Pérez-Navarro, R. Montoliu, E. Sansano-Sansano, M. Martínez-Garcia, R. Femenía, and J. Torres-Sospedra, “Accuracy of a Single Position Estimate for kNN-Based Fingerprinting Indoor Positioning Applying Error Propagation Theory,” IEEE Sens. J., vol. 23, no. 16, pp. 18765–18775, 2023, doi: 10.1109/JSEN.2023.3287856.

D. P. Yudha, B. I. Hasbi, and R. H. Sukarna, “Indoor Positioning System Berdasarkan Fingerprinting Received Signal Strength (RSS) Wifi Dengan Algoritma K-Nearest Neighbor (K-Nn),” Ilk. J. Ilm., vol. 10, no. 3, pp. 274–283, 2018, doi: 10.33096/ilkom.v10i3.364.274-283.

A. P. Permana, K. Ainiyah, and K. F. H. Holle, “Analisis Perbandingan Algoritma Decision Tree, kNN, dan Naive Bayes untuk Prediksi Kesuksesan Start-up,” JISKA (Jurnal Inform. Sunan Kalijaga), vol. 6, no. 3, pp. 178–188, 2021, doi: 10.14421/jiska.2021.6.3.178-188.

K. Akromunnisa and R. Hidayat, “Klasifikasi Dokumen Tugas Akhir (Skripsi) Menggunakan K-Nearest Neighbor,” JISKA (Jurnal Inform. Sunan Kalijaga), vol. 4, no. 1, p. 69, 2019, doi: 10.14421/jiska.2019.41-07.

V. Dang, M. Bendersky, and W. B. Croft, “Two-stage learning to rank for information retrieval,” Lect. Notes Comput. Sci. (including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics), vol. 7814 LNCS, pp. 423–434, 2013, doi: 10.1007/978-3-642-36973-5_36.

S. Sugriyono and M. U. Siregar, “Preprocessing kNN algorithm classification using K-means and distance matrix with students’ academic performance dataset,” J. Teknol. dan Sist. Komput., vol. 8, no. 4, 2020, doi: 10.14710/jtsiskom.2020.13874.

H. Jiawei, K. Micheline, and P. Jian, Data mining: Data mining concepts and techniques, 3rd ed. [1] H. Jiawei, K. Micheline, and P. Jian, Data mining: Data mining concepts and techniques. 2011.: Morgan Kaufmann is an imprint of Elsevier, 2011. doi: 10.1109/ICMIRA.2013.45.

Y. Yohannes, M. R. Pribadi, and L. Chandra, “Klasifikasi Jenis Buah dan Sayuran Menggunakan SVM Dengan Fitur Saliency-HOG dan Color Moments,” Elkha, vol. 12, no. 2, p. 125, 2020, doi: 10.26418/elkha.v12i2.42160.

M. R. Maarif, “Perbandingan Naïve Bayes Classifier dan Support Vector Machine untuk Klasifikasi Judul Artikel,” JISKA (Jurnal Inform. Sunan Kalijaga), vol. 1, no. 2, pp. 90–93, 2016, doi: 10.14421/jiska.2016.12-05.

C. Wei Hsu, C. Chung Chang, and C. Jen Lin, “A Practical Guide to Support Vector Classification,” Dep. Comput. Sci., 2016, doi: 10.1094/PHYTO-05-20-0185-R.

N. K. Dewi, S. Y. Mulyadi, and U. D. Syafitri, “Penerapan Metode Random Forest Dalam Driver Analysis,” Forum Stat. Dan Komputasi, vol. 16, no. 1, pp. 35–43, 2012.

R. A. Haristu, “Penerapan Metode Random Forest untuk Prediksi Win Ratio Pemain Player Unknown Battleground,” MEANS (Media Inf. Anal. dan Sist., vol. 4, no. 2, pp. 120–128, 2019, doi: 10.54367/means.v4i2.545.

N. I. Wibowo, T. A. Maulana, H. Muhammad, and N. A. Rakhmawati, “Perbandingan Algoritma Klasifikasi Sentimen Twitter Terhadap Insiden Kebocoran Data Tokopedia,” JISKA (Jurnal Inform. Sunan Kalijaga), vol. 6, no. 2, pp. 120–129, 2021, doi: 10.14421/jiska.2021.6.2.120-129.

L. Breiman, “RANDOM FORESTS,” Stat. Dep. Univ. Calif., 2001, doi: 10.14569/ijacsa.2016.070603.

M. Belgiu and L. Drăguţ, “Random forest in remote sensing: A review of applications and future directions,” ISPRS J. Photogramm. Remote Sens., vol. 114, pp. 24–31, 2016, doi:


T. Tukino, “Penerapan Algoritma C4.5 Untuk Memprediksi Keuntungan Pada PT SMOE Indonesia,” J. Sist. Inf. Bisnis, vol. 9, no. 1, p. 39, 2019, doi: 10.21456/vol9iss1pp39-46.

S. L. Salzberg, “Book Review: C4.5: by J. Ross Quinlan. Inc., 1993.,”, vol. 16, pp. 235–240, 1994.

S. Ruggieri, “Efficient C4.5 [classification algorithm],” IEEE Trans. Knowl. Data Eng., vol. 14, no. 2, pp. 438–444, 2002, doi: 10.1109/69.991727.

W. Ian H, E. Frank, and M. A. Hall, Data Mining: Practical Machine Learning Tools and Techniques. The Morgan Kaufmann Series in Data Management Systems, 2011. doi:

S. Kotsiantis, “Mössbauer study of Fe-Re alloys prepared by mechanical alloying,” Dep. Comput. Sci. Technol. Univ. Peloponnese, Greece, vol. 31, no. 1, pp. 249–268, 2007, doi: 10.1007/s10751-016-1232-6.

Creative Commons License

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