An open API service indexing awesome lists of open source software.

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πŸ˜‡βœ¨

Awesome Lists containing this project

README

          

# πŸ’» Laptop Price Predictor

![Laptop Price Predictor](assets/demo.png)

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😁✌🏻