Laptop Price Prediction Based on Specifications: A Comparison of Random Forest and Linear Regression
Abstract
This study investigates the prediction of laptop prices based on hardware specifications by comparing the performance of Linear Regression and Random Forest algorithms. The dataset consists of both numerical and categorical features, including brand, processor type, RAM capacity, storage configuration, screen size, and other relevant attributes that influence pricing. Data preprocessing was conducted through data cleaning, handling missing values, and transforming categorical variables using one-hot encoding. The dataset was then divided into training and testing sets with a 70:30 ratio to evaluate model generalization. Exploratory data analysis was performed using visualizations such as average price per brand, correlation heatmaps of numerical features, and scatter plots comparing actual and predicted prices. Model performance was evaluated using Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and the coefficient of determination (R²) on both training and testing data. The results indicate that the Random Forest model achieves higher predictive accuracy compared to Linear Regression, as it is more effective in capturing non-linear relationships and complex feature interactions. In contrast, Linear Regression tends to underperform due to its linear assumptions when applied to heterogeneous laptop specification data. These findings suggest that ensemble-based models are more suitable for laptop price prediction tasks involving diverse and non-linear feature patterns.
Keywords
Full Text:
PDFReferences
Siburian, A. D., Sitompul, D. R. H., Sinurat, S. H., Situmorang, A., Ruben, Ziegel, D. J., & Indra, E. (2022). Laptop price prediction with machine learning using regression algorithm. JUSIKOM PRIMA (Jurnal Sistem Informasi dan Ilmu Komputer Prima), 6(1), 87–91.
Sari, N. N., Anisah, T. T., & Fitriani, R. (2024). Implementasi machine learning untuk prediksi harga laptop menggunakan algoritma regresi linear berganda. Jurnal Manajemen Informatika (JAMIKA), 14(2), 162-177 .
Fahri, M. (2025). Penerapan algoritma random forest untuk deteksi phishing pada website. JITSI: Jurnal Ilmiah Teknologi Sistem Informasi, 6(2), 186–194.
Wardani, S. N., & Nurmalitasari. (2023). Penerapan regresi linier berganda untuk memprediksi harga laptop dengan menggunakan software python. Prosiding Seminar Nasional Teknologi Informasi dan Bisnis (SENATIB), 377–382.
Darma, I. W. A. S., Wirawan, I. M. A., & Darmawiguna, I. G. M. (2023). Comparative analysis of machine learning algorithms for laptop price prediction. Jurnal Pendidikan Teknologi dan Kejuruan, 20(1), 47–56.
Anggoro, R., Al Hakim, R. R., Saptiningtyas, R. P. S., Pradanaputra, S. A. G. G., Maulana, H., Muslih, A., & Solihin, M. A. (2022). Laptop price prediction using random forest regressor and linear regression algorithms. JST (Jurnal Sains dan Teknologi), 11(2), 221–229.
Darma, I. W. A. S., Pradnyana, I. M. A., & Darmawiguna, I. G. M. A. (2024). Penerapan algoritma random forest untuk prediksi harga laptop. JITSI: Jurnal Ilmiah Teknologi Sistem Informasi, 5(2), 70–76.
Amnur, A., Hadi, R., Mooduto, H. A., Idmayanti, R., Syaljumairi, R., & Asri, E. (2025). Prediksi harga laptop berdasarkan spesifikasi menggunakan algoritma k-nearest neighbour. JITSI: Jurnal Ilmiah Teknologi Sistem Informasi, 6(3), 267–273.
Fahri, M. (2025). Penerapan algoritma random forest untuk deteksi phishing pada website. JITSI: Jurnal Ilmiah Teknologi Sistem Informasi, 6(2), 186–194.
Harahap, R., Karpen, Yenni, H., & Jamaris, M. (2025). Implementasi algoritma regresi linear untuk memprediksi harga laptop. Jurnal Ilmiah BETRIK, 16(02), 157–171.
Septiyanah, S., & Athalina, G. (2025). Implementasi algoritma random forest regression dalam prediksi harga laptop. Jurnal MNEMONIC, 8(1), 70–75.
Tian, P. (2024). Research on laptop price predictive model based on linear regression, random forest and xgboost. Highlights in Science, Engineering and Technology, 85, 265–271.
Wardani, S. N., & Nurmalitasari. (2023). Penerapan regresi linier berganda untuk memprediksi harga laptop dengan menggunakan software python. Prosiding Seminar Nasional Teknologi Informasi dan Bisnis (SENATIB), 377–382
Hadi, N., & Benedict, J. (2024). Implementasi machine learning untuk prediksi harga rumah menggunakan algoritma random forest. Computatio: Journal of Computer Science and Information Systems, 8(1), 50–61.
Hidayat, R., Saputra, H. T., Husnah, M., Nabila, Hidayatullah, M. B., Nazhmi, M. N., Azra, J., & Rana, A. (2025). Implementasi algoritma random forest regression untuk memprediksi penjualan produk di supermarket. Jurnal Sistem Informasi dan Sistem Komputer, 10(1), 101–110.
Ilmi, I. N., Mustafid, & Suparti. (2025). Penerapan model regresi random forest untuk prediksi harga laptop berdasarkan fitur laptop. Jurnal Gaussian, 14(2), 269–279
Utami, P., Jundi, M., Rahmaddeni, & Sinaga, L. (2025). Property price prediction using the random forest regression algorithm. SITEKIN: Jurnal Sains, Teknologi dan Industri, 22(2), 208–215.
Amnur, A., Hadi, R., Mooduto, H. A., Idmayanti, R., Syaljumairi, R., & Asri, E. (2025). Prediksi harga laptop berdasarkan spesifikasi menggunakan algoritma k-nearest neighbour. JITSI: Jurnal Ilmiah Teknologi Sistem Informasi, 6(3), 267–273.
Asnur, H., Yunita, R., & Marsa, A. R. (2025). Algoritma random forest untuk prediksi perkerasan tanah. Jurnal Pustaka AI, 5(2), 381–387
Gulo, S. H. T., Rumapea, H., & Simanullang, H. G. (2025). Penerapan data mining dalam pemilihan laptop mahasiswa menggunakan metode random forest (Studi kasus: Universitas Methodist Indonesia). Methosisfo: Jurnal Ilmiah Sistem Informasi, 5(1), 55–64.
Nugroho, M. W. (2025). Analisis performa algoritma random forest dalam mengatasi overfitting pada model prediksi. Program Studi Teknik Informatika, Universitas Kristen Satya Wacana.
Srinivas, K. S., Sai, K. T., Sriram, K. M. S., & Rao, P. S. V. (2024). Laptop price prediction in machine learning using random forest classifier technique. International Journal of Innovative Science and Research Technology, 9(2), 1251–1256.
Wijaya, S., & Fauziah. (2023). Analysis of the comparison between linear regression, random forest, and logistic regression methods in predicting crude palm oil (CPO) price. Brilliance: Research of Artificial Intelligence, 3(2), 243–251.
Adrianty, S., & Maspiyanti, F. (2024). Laptop price prediction using extreme gradient boosting algorithm. Journal of Applied and Research Computer Science and Information Systems, 2(1), 132–148.
Bindu, K. S., & Ashwini, C. (2024). Laptop price prediction using machine learning. International Journal of Advances in Engineering and Management (IJAEM), 6(07), 492–495.
DOI: http://dx.doi.org/10.22441/collabits.v3i1.37603
Refbacks
- There are currently no refbacks.
Journal Collabits
| Print ISSN: 3062-8601 | |
| Online ISSN: 3046-6709 |
Sekretariat
Fakultas Ilmu Komputer
Universitas Mercu Buana
Jl. Raya Meruya Selatan, Kembangan, Jakarta 11650
Tlp./Fax: +62215871335
http://publikasi.mercubuana.ac.id/index.php/collabits
e-mail: [email protected]

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




