A machine learning project that predicts laptop prices based on their specifications using various regression models. This end-to-end pipeline includes data preprocessing, feature engineering, model training, evaluation, and visualization.
This project explores a dataset of laptops and their specifications to predict prices using multiple regression techniques. The best-performing model is deployed through a pipeline that includes preprocessing and prediction steps.
- Python π
- Pandas
- NumPy
- Matplotlib & Seaborn
- Scikit-learn
- XGBoost
The dataset laptop_data.csv
includes the following features:
- Company (Brand)
- Type (Notebook, Ultrabook, etc.)
- RAM, Weight, Screen Size
- Processor, GPU, Operating System
- Memory (HDD, SSD, etc.)
- Target Variable: Price
- Linear Regression
- Ridge & Lasso Regression
- Decision Tree Regressor
- K-Nearest Neighbors Regressor
- Random Forest Regressor β (Best Performance)
- Gradient Boosting, AdaBoost, Extra Trees
- XGBoost
- Support Vector Regressor (SVR)
Model: Random Forest Regressor
Hyperparameters:
n_estimators = 100
max_depth = 15
max_samples = 0.5
max_features = 0.75
Evaluation Metrics:
Metric | Value |
---|---|
RΒ² Score | 0.88 |
MAE | 0.15 (after scaling) |