Journal Collabits
Vol 3, No 1 (2026)

Laptop Price Prediction Based on Specifications: A Comparison of Random Forest and Linear Regression

Putra, Bagas Pratama (Unknown)
Mahfuzh, Ilham Miftahali (Unknown)
Kurniawan, Agus Fahrizal (Unknown)
Budiman, Ramdani (Unknown)



Article Info

Publish Date
22 Feb 2026

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.

Copyrights © 2026






Journal Info

Abbrev

collabits

Publisher

Subject

Computer Science & IT Engineering

Description

Journal Collabits adalah jurnal yang membahas strategi keamanan cyber untuk meningkatkan kinerja dan keandalan dalam implementasi teknologi kecerdasan buatan (AI), kecerdasan bisnis (BI), dan sains data, yang di kelola oleh Fakultas Ilmu Komputer (FASILKOM) terdiri dari dua prodi yaitu Teknik ...