ANALISIS PERBANDINGAN ALGORITMA LINEAR REGRESSION DAN RANDOM FOREST UNTUK PREDIKSI MINAT PEMBELIAN KONSUMEN PADA E-COMMERCE SHOPEE DAN TOKOPEDIA - Junior Mulatua S. Munthe; David Beckham Aritonang; Dio Kurnia Syahputra; Saut Parsaoran Tamba (JOURNAL OF SCIENCE AND SOCIAL RESEARCH, 2026)
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