Perbandingan Kinerja Model Klasifikasi dalam Memprediksi Intensi Pembelian Pengunjung E-Commerce
Abstract
This study aims to analyze and compare the performance of the Naive Bayes, K-Nearest Neighbors (KNN), and Decision Tree algorithms in predicting the purchase intention of e-commerce visitors using the Online Shoppers Purchasing Intention Dataset, which consists of 12,330 records and 18 variables, with the Revenue variable serving as the classification target. The preprocessing stage involved transforming categorical and boolean variables into numerical form, standardizing features using StandardScaler, and splitting the dataset into 80 percent training data and 20 percent testing data. Model evaluation was conducted using accuracy, precision, recall, F1-score, and ROC-AUC metrics, and was further strengthened by 10-fold cross-validation to obtain more stable results. The findings indicate that KNN achieved the highest accuracy of 0.866180, while Naive Bayes produced the highest recall value of 0.690998 and the highest ROC-AUC value of 0.821696. Meanwhile, Decision Tree demonstrated relatively balanced performance with an accuracy of 0.857259 and an F1-score of 0.571776, whereas the cross-validation results identified KNN as the model with the highest average accuracy of 0.8770. These findings suggest that the selection of a classification model for purchase intention prediction cannot rely solely on a single evaluation metric, as each algorithm possesses different strengths. Therefore, a comparative approach among algorithms can help determine the most suitable model for supporting consumer behavior analysis on e-commerce platforms.
References
[2] Arifin, M., & Setyawan, A. (2021). Comparative analysis of classification algorithms. Jurnal Informatika Indonesia, 6(1), 45–53.
[3] Dewi, R., & Saputri, L. (2020). Data mining classification for e-commerce. Jurnal Sistem Informasi, 11(2), 88–96.
[4] Fauzan, M., & Ramdani, R. (2022). Digital consumer behavior modeling. Jurnal Bisnis Digital, 6(1), 20–29.
[5] Fauzi, A., & Nugroho, B. (2022). Machine learning classification performance analysis. Jurnal Teknologi Informasi, 14(2), 101–110.
[6] Firmanda, A., & Saputro, D. (2022). Decision tree pruning techniques. Jurnal Komputer Terapan, 10(1), 15–23.
[7] Firmansyah, D., & Hidayat, T. (2021). Machine learning in business prediction. Jurnal Ilmu Komputer, 13(1), 45–52.
[8] Halim, R., & Prakoso, B. (2021). Classification model evaluation. Jurnal Data Science Indonesia, 3(1), 23–31.
[9] Handayani, R., & Pramono, A. (2020). Naive Bayes classification method. Jurnal Ilmu Komputer, 12(1), 25–32.
[10] Hidayat, T., & Nugroho, F. (2021). E-commerce behavior analysis. Jurnal Bisnis Digital, 5(1), 12–20.
[11] Kurniasari, L., & Nugroho, F. (2021). Naive Bayes in classification tasks. Jurnal Sistem Informasi, 13(1), 55–63.
[12] Kurniawan, D., & Saputra, R. (2020). Online purchase intention factors. Jurnal Manajemen Pemasaran, 8(2), 55–63.
[13] Kusnadi, A., & Prabowo, H. (2022). Classification of user behavior in e-commerce. Jurnal Data Science Indonesia, 4(1), 10–18.
[14] Mahendra, R., & Kusumo, B. (2021). KNN algorithm analysis. Jurnal Teknologi Informasi, 12(2), 60–68.
[15] Maulana, R., & Kurnia, F. (2021). Decision tree in classification problems. Jurnal Teknologi Komputer, 10(1), 50–58.
[16] Nanda, A., & Kusuma, R. (2022). Comparative study of machine learning algorithms. Jurnal Informatika Terapan, 14(1), 34–41.
[17] Nugraha, Y., & Pratama, A. (2020). Data mining techniques for prediction. Jurnal Komputer dan Informatika, 10(1), 22–30.
[18] Nugroho, A., & Setiawan, B. (2020). Decision tree classification method. Jurnal Informatika Modern, 8(1), 22–30.
[19] Pradana, R., & Santoso, B. (2022). E-service quality and purchase intention. Jurnal Manajemen Digital, 8(2), 75–83.
[20] Pramudita, R., & Sari, N. (2020). Digital consumer behavior analysis. Jurnal Ekonomi Digital, 4(1), 15–24.
[21] Prasetyo, A., & Hadi, S. (2021). Multi-metric evaluation in classification. Jurnal Teknologi Informasi dan Komunikasi, 13(2), 90–98.
[22] Puspitasari, R., & Hidayat, T. (2021). The impact of feature independence assumption on Naive Bayes classification performance. Jurnal Ilmu Komputer, 13(2), 75–83.
[23] Putra, A., & Andriani, D. (2022). Information quality and purchase intention. Jurnal Sistem Informasi, 12(1), 55–63.
[24] Putri, A., & Laksmi, D. (2022). Pattern recognition using machine learning. Jurnal Ilmu Data, 4(1), 15–24.
[25] Rahardjo, B., & Wibisono, A. (2021). Trust in online shopping. Jurnal Manajemen Digital, 7(2), 75–83.
[27] Rahman, A., & Fauzan, M. (2021). Predictive analytics in e-commerce. Jurnal Teknologi Informasi, 12(2), 60–68.
[28] Rahmawati, N., & Siregar, D. (2021). Machine learning classification accuracy. Jurnal Ilmu Komputer, 13(2), 90–98.
[29] Saputro, E., & Firmanto, A. (2021). Data mining classification methods. Jurnal Teknologi Informasi, 12(1), 45–53.
[30] Santoso, B., & Wijaya, H. (2022). Classification algorithms comparison. Jurnal Informatika, 15(2), 87–95.
[31] Saputra, D., & Firmansyah, A. (2022). Decision support systems in business. Jurnal Teknologi Informasi, 14(1), 33–41.
[32] Sari, N., & Prasetyo, B. (2021). Decision tree interpretability. Jurnal Informatika Terapan, 13(1), 34–42.
[33] Sari, N., & Utami, R. (2021). Risk perception in online purchase. Jurnal Ekonomi Digital, 5(2), 44–52.
[34] Setiawan, D., & Lestari, P. (2022). Purchase intention modeling. Jurnal Manajemen, 9(1), 20–29.
[35] Sutrisno, H., & Wulandari, S. (2021). E-commerce consumer behavior. Jurnal Ekonomi Digital, 5(1), 10–18.
[36] Utami, R., & Wibowo, A. (2021). Classification model comparison. Jurnal Data Science Indonesia, 3(2), 45–53.
[37] Utomo, A., & Prabowo, H. (2021). Data-driven decision making. Jurnal Sistem Informasi, 11(1), 10–18.
[38] Wahyuni, S., & Prasetyo, B. (2021). Digital marketing effectiveness. Jurnal Bisnis Modern, 6(2), 77–85.
[39]Wibowo, A., & Santika, D. (2022). Machine learning evaluation methods. Jurnal Teknologi Komputer, 11(2), 66–74.
[40] Wijayanti, R., & Nugraha, B. (2021). User experience and purchase intention. Jurnal Bisnis Modern, 6(2), 77–85.
[41] Yulianto, A., & Prasetya, D. (2020). KNN algorithm implementation. Jurnal Informatika Indonesia, 6(2), 60–68.
[42] Yusuf, M., & Ramadhan, R. (2022). Consumer behavior in digital era. Jurnal Ekonomi dan Bisnis, 10(1), 55–63.
Copyright (c) 2025 Sri Eniyati, Rina Candra Noor Santi, Heribertus Yulianton, Sunardi Sunardi, Sulastri Sulastri, Sugiyamta Sugiyamta

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







