ANALISIS PERBANDINGAN ALGORITMA LINEAR REGRESSION DAN RANDOM FOREST UNTUK PREDIKSI MINAT PEMBELIAN KONSUMEN PADA E-COMMERCE SHOPEE DAN TOKOPEDIA

Authors

  • Junior Mulatua S. Munthe Universitas Prima Indonesia; Pusat Unggulan IPTEK (PUI-ITIK) Inovasi Teknologi Ilmu Komputer
  • David Beckham Aritonang Universitas Prima Indonesia; Pusat Unggulan IPTEK (PUI-ITIK) Inovasi Teknologi Ilmu Komputer
  • Dio Kurnia Syahputra Universitas Prima Indonesia; Pusat Unggulan IPTEK (PUI-ITIK) Inovasi Teknologi Ilmu Komputer
  • Saut Parsaoran Tamba Universitas Prima Indonesia; Pusat Unggulan IPTEK (PUI-ITIK) Inovasi Teknologi Ilmu Komputer

DOI:

https://doi.org/10.54314/jssr.v9i3.6513

Keywords:

Purchase Intention, E-commerce, Linear Regression, Random Forest, Machine Learning

Abstract

Abstract: The rapid growth of e-commerce in Indonesia, particularly on the Shopee and Tokopedia platforms, has increased the need for data-driven approaches to better understand consumer purchase intentions. This study aims to compare the performance of the Linear Regression and Random Forest algorithms in predicting consumer purchase intentions based on price perception, product ratings, consumer reviews, and trust in the platform. A quantitative approach was employed using primary data collected through questionnaires distributed to Shopee and Tokopedia users with a 1–5 Likert scale. The data were processed using Python through preprocessing, validity and reliability testing, and predictive model development. Model performance was evaluated using Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and R² Score. The results indicate that Random Forest achieved better predictive performance on the Shopee dataset, while Linear Regression produced better results on the Tokopedia dataset. These findings suggest that the effectiveness of a prediction model is influenced by the characteristics of the dataset, highlighting the importance of selecting an appropriate algorithm to achieve optimal prediction performance in e-commerce applications

Keywords: Purchase Intention, E-commerce, Linear Regression, Random Forest, Machine Learning

 

Abstrak: Perkembangan e-commerce di Indonesia, khususnya pada platform Shopee dan Tokopedia, mendorong kebutuhan akan pemanfaatan analisis data untuk memahami minat pembelian konsumen secara lebih akurat. Penelitian ini bertujuan membandingkan kinerja algoritma Linear Regression dan Random Forest dalam memprediksi minat pembelian konsumen berdasarkan variabel persepsi harga, rating produk, ulasan konsumen, dan kepercayaan terhadap platform. Penelitian menggunakan pendekatan kuantitatif dengan data primer yang diperoleh melalui penyebaran kuesioner kepada pengguna Shopee dan Tokopedia menggunakan skala Likert 1–5. Data diolah menggunakan Python melalui tahapan preprocessing, uji validitas dan reliabilitas, serta pembangunan model prediksi. Evaluasi model dilakukan menggunakan metrik Mean Absolute Error (MAE), Root Mean Square Error (RMSE), dan R² Score. Hasil penelitian menunjukkan bahwa Random Forest memberikan performa yang lebih baik pada data Shopee, sedangkan Linear Regression menghasilkan performa yang lebih baik pada data Tokopedia. Temuan ini menunjukkan bahwa karakteristik data memengaruhi kinerja algoritma, sehingga pemilihan model prediksi perlu disesuaikan untuk memperoleh hasil yang optimal.

Kata kunci: Minat Pembelian, E-commerce, Linear Regression, Random Forest, Machine Learning

Downloads

Download data is not yet available.

References

A. Balyemah, S. Weamie, J. Bin, K. V. Jarnda, and F. J. Joshua, “Predicting Purchasing Behavior on E-Commerce Platforms: A Regression Model Approach for Understanding User Features that Lead to Purchasing,” International Journal of Communications, Network and System Sciences, vol. 17, no. 6, pp. 81–103, 2024.

D. E. Kurniawan and T. Erwina, “Enhancing Consumer Purchasing Pattern Prediction on E-Commerce Platforms Using Random Forest Algorithm: A Simulation Approach,” in Proc. International Conference on Applied Engineering (ICAE), 2025, pp. 45–53.

M. Saputra and A. Fersellia, “Prediksi Loyalitas Pelanggan E-Commerce Menggunakan Algoritma Random Forest pada Platform Shopee,” Jurnal Teknologi Informasi dan Komputer, vol. 5, no. 2, pp. 120–128, 2022.

A. Ruscikasani, R. Prasetyo, and D. Wijayanti, “Prediction of Online Shopper Purchase Intention Based on Session Behavior Analysis,” Journal of Data Science and Information Systems, vol. 4, no. 1, pp. 15–25, 2021.

H. Wijaya and L. Fauziah, “Comparative Analysis of Machine Learning Algorithms for Consumer Purchase Prediction,” International Journal of Computer Applications, vol. 184, no. 42, pp. 12–20, 2023.

L. Breiman, “Random Forest-Based Consumer Behavior Prediction in E-Commerce Applications,” Machine Learning Applications, vol. 8, pp. 101–112, 2021.

Y. Zhang and Q. Yu, “User Purchase Intention Prediction Based on Improved Deep Forest,” Computer Modeling in Engineering & Sciences, vol. 137, no. 2, pp. 1431–1450, 2023.

A. Syah, F. Nurdiyansyah, and A. Y. Rahman, “Analisis Sentimen Aplikasi Shopee, Tokopedia, Lazada dan Blibli Menggunakan Leksikon dan Random Forest,” Jurnal Informatika dan Teknik Elektro Terapan, vol. 12, no. 3S1, pp. 1–10, 2024.

E. S. Barus and D. Darmanto. (2024). Implementasi Metode Random Forest untuk Memprediksi Penjualan Produk. Jurnal Teknik Informasi dan Komputer (Tekinkom).

S. Ahmed and M. Ibrahim, “Machine Learning-Based Random Forest Prediction of Online Shopping Behavior,” in Proc. ACM International Conference on Data Analytics, 2025, pp. 221–230.

M. Hossain and T. Rahman, “Random Forest Approach for E-Commerce Demand Forecasting and Purchase Prediction,” Journal of Artificial Intelligence Research, vol. 18, no. 4, pp. 211–223, 2022.

W. Chen and Y. Li, “Comparative Study of Linear Regression and Ensemble Learning Methods for Consumer Purchase Prediction,” Expert Systems with Applications, vol. 201, pp. 117–126, 2022.

A. Jain, “Predicting E-Commerce Purchase Behavior Using a DQN-Inspired Deep Learning Model for Enhanced Adaptability,” arXiv preprint arXiv:2506.17543, 2025.

A. Verma, “Consumer Behaviour in Retail: Next Logical Purchase Using Deep Neural Network,” arXiv

preprint arXiv:2010.06952, 2020.

S. Gupta and P. Sharma, “E-Commerce Consumer Purchase Prediction Using Machine Learning Techniques,” International Journal of Advanced Computer Science and Applications, vol. 13, no. 5, pp. 455–463, 2022.

R. Kumar and V. Singh, “Machine Learning Models for Online Shopping Purchase Intention Analysis,” Journal of Big Data Analytics, vol. 7, no. 2, pp. 67–79, 2023.

N. Sari and M. Kurniawan, “Pengaruh Persepsi Harga dan Ulasan Konsumen terhadap Minat Pembelian pada Marketplace Shopee,” Jurnal Manajemen dan Bisnis Digital, vol. 4, no. 2, pp. 89–98, 2022.

F. Ramadhan and D. Putra, “Analisis Pengaruh Rating Produk terhadap Keputusan Pembelian Konsumen pada E-Commerce Tokopedia,” Jurnal Sistem Informasi dan Teknologi Informasi, vol. 6, no. 1, pp. 45–53, 2023.

A. Pratama and R. Lestari, “Kepercayaan Platform dan Minat Pembelian Konsumen pada Marketplace Indonesia,” Jurnal Ekonomi Digital, vol. 5, no. 3, pp. 120–129, 2024.

I. Maulana and S. Hidayat, “Machine Learning Approaches for Consumer Purchase Intention Prediction in Indonesian E-Commerce,” Journal of Information Systems Engineering and Business Intelligence, vol. 10, no. 1, pp. 33–44, 2024

Downloads

Published

2026-06-18

Issue

Section

Artikel