Skip to content

ViMo018/Laptop_Price_Predictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’» Laptop Price Predictor

Ever wondered how much your dream laptop should cost? πŸ€”
This project is a Machine Learning model that predicts the price of a laptop based on its configuration β€” things like RAM, CPU, GPU, brand, OS, touchscreen, weight, and more.

I trained this model using a dataset of laptops and deployed it with a simple interface so you can test it yourself! πŸš€


βœ… Try it out here! πŸš€

πŸ“Š Dataset & EDA

  • Cleaned the dataset by dropping unnecessary columns like Cpu, Cpu Name, Memory (after feature engineering).
  • Extracted useful features such as:
    • Whether the screen is Touchscreen or not
    • Whether it has an IPS panel
    • Screen resolution & PPI
    • Encoded categorical variables like Company, TypeName, OS, GPU Brand using OneHotEncoder.
  • Handled missing values & ensured consistent formatting for numerical + categorical columns.
  • Target variable: Laptop Price (log-transformed for stability).

βš™οΈ Model Building

  • Used a Pipeline for preprocessing + model training.
  • Steps:
    1. ColumnTransformer β†’ One-hot encoding for categorical features.
    2. RandomForestRegressor as the main model.
  • Hyperparameters tuned:
    • n_estimators=100
    • max_depth=15
    • max_features=0.75
    • max_samples=0.5

πŸ“ˆ Performance

  • Evaluated on test data.
  • πŸ“Œ RΒ² Score: ~0.86
  • πŸ“Œ Mean Absolute Error (MAE): ~0.19 (after taking exp back from log)

Pretty solid for predicting real-world laptop prices .


πŸ› οΈ Tech Stack

  • Python
  • Scikit-learn (ML model)
  • Pandas, NumPy (data wrangling)
  • Matplotlib, Seaborn (EDA & plots)
  • Streamlit (for deployment / frontend)

About

Link

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published