Welcome to the Machine Learning Predicts Laptop Prices repository! This project leverages a dataset from a laptop store to predict laptop prices using advanced machine learning models. We employ Random Forest and XGBRegressor to achieve accurate predictions.
- Introduction
- Dataset
- Models Used
- Installation
- Usage
- Results
- Visualization
- Contributing
- License
- Contact
This project aims to predict laptop prices based on various features such as specifications, brand, and more. By utilizing machine learning techniques, we can analyze the dataset and provide insights into how different factors influence pricing.
The dataset used in this project contains various attributes of laptops available in the market. Key features include:
- Brand
- Model
- Processor
- RAM
- Storage
- Graphics
- Display Size
- Price
The dataset allows us to train our models effectively, ensuring that we capture the essential patterns needed for accurate predictions.
Random Forest is an ensemble learning method that operates by constructing multiple decision trees. It improves accuracy and controls overfitting, making it suitable for this project.
XGBRegressor is a powerful implementation of gradient boosting. It provides high performance and is efficient in handling large datasets, making it an excellent choice for predicting laptop prices.
To get started, you need to clone this repository and install the required packages. Run the following commands in your terminal:
git clone https://github.com/Shayan1408/Machine_learning_predicts_laptop_prices.git
cd Machine_learning_predicts_laptop_prices
pip install -r requirements.txt
Make sure you have Python 3.x installed on your machine. The requirements.txt
file includes all necessary libraries such as numpy
, pandas
, scikit-learn
, and others.
After installing the required packages, you can run the main script to train the models and make predictions. Use the following command:
python main.py
This will execute the training process and display the results in your terminal. You can also modify the script to test different features or models.
The results from our models show a promising level of accuracy. We evaluate the models using metrics such as Mean Absolute Error (MAE) and R-squared (R²). The performance of both Random Forest and XGBRegressor indicates that machine learning can effectively predict laptop prices.
Data visualization plays a crucial role in understanding the relationships between features and prices. We utilize libraries like matplotlib
and seaborn
to create informative plots. Here are some examples of visualizations included in the project:
- Price Distribution: A histogram showing the distribution of laptop prices.
- Feature Importance: A bar chart illustrating the importance of various features in predicting prices.
- Correlation Heatmap: A heatmap that displays the correlation between different features.
You can find these visualizations in the visualizations
folder of the repository.
We welcome contributions to improve this project. If you have suggestions or find bugs, please open an issue or submit a pull request. Make sure to follow the guidelines in the CONTRIBUTING.md
file.
This project is licensed under the MIT License. See the LICENSE
file for more details.
For any questions or feedback, feel free to reach out:
- Author: Shayan
- Email: shayan@example.com
- GitHub: Shayan1408
For the latest updates and downloads, visit the Releases section.
Thank you for checking out this project! Happy coding! 🚀