https://github.com/sarthak-0-sach/laptop-price-predictor
Just as the name suggests, this project's solo goal is to simplify finding laptops in a world where there are ton of companies offering variety of features and specifications at numerous price differences. This project aims to be the best analysis tool of what should be the price of a standard laptop with desired specifications. Follow for moreπβ¨
https://github.com/sarthak-0-sach/laptop-price-predictor
advanced-python beginner-friendly-python-project gradient-boosting knn-algorithm laptop-price-prediction random-forest-regressor svm-classifier xgboost-model
Last synced: 7 months ago
JSON representation
Just as the name suggests, this project's solo goal is to simplify finding laptops in a world where there are ton of companies offering variety of features and specifications at numerous price differences. This project aims to be the best analysis tool of what should be the price of a standard laptop with desired specifications. Follow for moreπβ¨
- Host: GitHub
- URL: https://github.com/sarthak-0-sach/laptop-price-predictor
- Owner: SartHak-0-Sach
- License: mit
- Created: 2024-11-28T14:04:34.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-12-01T07:12:56.000Z (11 months ago)
- Last Synced: 2025-02-07T16:18:42.696Z (9 months ago)
- Topics: advanced-python, beginner-friendly-python-project, gradient-boosting, knn-algorithm, laptop-price-prediction, random-forest-regressor, svm-classifier, xgboost-model
- Language: Jupyter Notebook
- Homepage: https://www.linkedin.com/in/sarthak2004/
- Size: 1.83 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π» Laptop Price Predictor

Welcome to the **Laptop Price Predictor**! π
This project combines **machine learning models** with **intuitive user interfaces** to predict laptop prices based on specifications and features.
## π Table of Contents
1. [π Description](#-description)
2. [β¨ Features](#-features)
3. [π Dataset Details](#-dataset-details)
4. [π€ Regressor Models](#-regressor-models)
5. [π Selected Models](#-selected-models)
6. [π΅ Price Currency Conversion](#-price-currency-conversion)
7. [π₯οΈ Running the Application](#-running-the-application)
8. [π Metrics](#-metrics)
9. [π‘ Future Enhancements](#-future-enhancements)
10. [π Contribution](#-contribution)
## π Description
The **Laptop Price Predictor** uses various **regression models** to predict laptop prices based on their specifications. Designed to support **data enthusiasts and tech shoppers**, this tool is powered by Python and machine learning libraries.
## β¨ Features
- π» Predict laptop prices based on features like company, CPU, RAM, GPU, and more.
- π Experiment with multiple regression models for optimal results.
- π Supports **currency conversion** from INR to USD.
- π Evaluate models using key metrics: **RΒ² Score** and **Mean Absolute Error (MAE)**.
## π Dataset Details
The dataset includes **1302 laptops** with 12 attributes, sourced from Amazon (2017-2018).
| **Attribute** | **Description** |
|------------------------|---------------------------------------------|
| **Company Name** | Laptop brand (e.g., Dell, HP, Apple) |
| **Type Name** | Form factor (e.g., Ultrabook, Gaming) |
| **Laptop Size** | Screen size (in inches) |
| **Screen Resolution** | Display resolution (e.g., 1920x1080) |
| **CPU** | Processor type |
| **RAM** | Memory capacity (GB) |
| **Memory** | Storage capacity (HDD/SSD) |
| **GPU** | Graphics card details |
| **Operating System** | OS type (e.g., Windows, macOS) |
| **Price (INR)** | Price in Indian Rupees |
---
## π€ Regressor Models
| **Model** | **Description** |
|----------------------------|-------------------------------------|
| Multiple Linear Regression | Basic regression model |
| Ridge Regression | Regularized linear regression |
| Lasso Regression | Sparse regression |
| k-Nearest Neighbors (k-NN) | Distance-based prediction |
| Decision Tree | Tree-based regression model |
| Support Vector Machine | Kernel-based regression |
| Random Forest | Ensemble tree model |
| Extra Trees | Advanced ensemble model |
| Adaptive Boost (AdaBoost) | Boosting-based ensemble |
| Gradient Boost | Gradient-based optimization |
| XGBoost | Highly efficient boosting |
| Voting Regressor | Combines multiple models |
| Stacking Regressor | Model stacking for better accuracy |
## π Selected Models
### 1. **Random Forest Regressor**
- **RΒ² Score**: **88.78%**
- **Mean Absolute Error**: **15.94%**
### 2. **Voting Regressor** *(Random Forest + Gradient Boost)*
- **RΒ² Score**: **89.27%**
- **Mean Absolute Error**: **15.37%**
## π΅ Price Currency Conversion
This project supports **price conversion** from INR to USD.
Default exchange rate: **1 INR = 0.012 USD**
```python
st.title(f"\nPrice: {round(predicted_price * 0.012, 2)} USD")
```
The exchange rate can be easily updated as needed.
## π₯οΈ Running the Application
1. Install required dependencies:
```bash
pip install -r requirements.txt
```
2. Launch the Streamlit application:
```bash
streamlit run app.py
```
## π Metrics
The performance of each regression model is evaluated using:
- **RΒ² Score**: Measures the variance explained by the model.
- **Mean Absolute Error (MAE)**: Captures the average prediction error.
## π‘ Future Enhancements
- Integration with **live datasets** for real-time predictions.
- Incorporating **deep learning models** for improved accuracy.
- Adding support for additional **currency conversions** and **visualization dashboards**.
## π Contribution
π‘ **Ideas?** Contributions are always welcome! Submit issues, pull requests, or share your feedback to help improve this project.
β If you found this project useful, don't forget to **star the repository**! π
**Made with β€οΈ by **Sarthak Sachdev** for machine learning enthusiasts**
### Follow for moreπβπ»