Skip to content

About

A machine learning project that predicts car prices using Linear Regression, Decision Tree, Random Forest, and Gradient Boosting with data preprocessing, feature engineering, EDA, model evaluation, and model persistence.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

🚗 Car Price Prediction using Machine Learning

An end-to-end Machine Learning project that predicts the market price of a car based on its specifications. The project covers the complete ML workflow, from data preprocessing and feature engineering to model training, evaluation, and deployment through a Streamlit web application.


🌐 Live Demo

🔗 Streamlit App: https://car-price-prediction-using-machine-learning-csvuu8ehykvsnwqbtq.streamlit.app/

📂 GitHub Repository: https://github.com/Shibaji157/Car-Price-Prediction-Using-Machine-Learning


📌 Project Overview

The objective of this project is to build a machine learning model capable of accurately predicting car prices using various vehicle specifications.

The project includes:

  • Data Cleaning
  • Feature Engineering
  • Exploratory Data Analysis (EDA)
  • Model Training
  • Model Comparison
  • Cross Validation
  • Model Evaluation
  • Feature Importance Analysis
  • Model Saving
  • Streamlit Web Application Deployment

📊 Dataset Information

Dataset: Car Price Prediction Dataset

  • Total Records: 205
  • Original Features: 26
  • Engineered Features: 65
  • Target Variable: Price

🛠 Technologies Used

  • Python
  • Pandas
  • NumPy
  • Matplotlib
  • Scikit-learn
  • Joblib
  • Streamlit
  • Git
  • GitHub

🤖 Machine Learning Algorithms Compared

Model R² Score
Linear Regression 0.9097
Decision Tree 0.9069
Random Forest 0.9595 ✅
Gradient Boosting 0.9246

🏆 Best Performing Model

Random Forest Regressor

Performance Metrics

Metric Value
R² Score 95.95%
MAE 1248.12
RMSE 1786.98

📈 Project Workflow

Dataset
      │
      ▼
Data Cleaning
      │
      ▼
Feature Engineering
      │
      ▼
Exploratory Data Analysis
      │
      ▼
Model Training
      │
      ▼
Model Comparison
      │
      ▼
Model Evaluation
      │
      ▼
Model Saving
      │
      ▼
Streamlit Deployment

📂 Project Structure

Car-Price-Prediction-Using-Machine-Learning
│
├── app.py
├── main.py
├── requirements.txt
├── README.md
│
├── data/
│   └── CarPrice_Assignment.csv
│
├── images/
│   ├── feature_importance.png
│   ├── prediction_plot.png
│   └── eda/
│
├── models/
│   └── best_model.pkl
│
├── outputs/
│   ├── model_metrics.csv
│   └── processed_dataset.csv
│
├── src/
│   ├── preprocessing.py
│   ├── feature_engineering.py
│   ├── eda.py
│   ├── model_training.py
│   ├── evaluation.py
│   ├── feature_importance.py
│   ├── model_saver.py
│   └── prediction.py
│
└── test_prediction.py

🚀 Features

  • Clean and modular project structure
  • Automatic data preprocessing
  • Feature engineering
  • Exploratory data analysis
  • Multiple regression models
  • Model comparison
  • Cross validation
  • Feature importance visualization
  • Model evaluation metrics
  • Model persistence using Joblib
  • Interactive Streamlit web application
  • Live prediction support

💻 Installation

Clone the repository

git clone https://github.com/Shibaji157/Car-Price-Prediction-Using-Machine-Learning.git

Move into the project directory

cd Car-Price-Prediction-Using-Machine-Learning

Install dependencies

pip install -r requirements.txt

Run the application

streamlit run app.py

📷 Application Screenshots

Home Page

Homepage


Prediction Interface

Prediction Interface


Prediction Result

Prediction Result


Feature Importance

Feature Importance


Prediction vs Actual

Actual vs Prediction


Model Results

Model_Results

📈 Future Improvements

  • Hyperparameter tuning using GridSearchCV
  • XGBoost implementation
  • LightGBM implementation
  • User authentication
  • Cloud database integration
  • Docker deployment
  • CI/CD pipeline
  • REST API using FastAPI

👨‍💻 Author

Shibaji Biswas

B.Tech in Artificial Intelligence & Machine Learning

Chandigarh University

GitHub: https://github.com/Shibaji157

LinkedIn: https://www.linkedin.com/in/shibaji-biswas


⭐ Support

If you found this project useful, consider giving it a ⭐ on GitHub.


📜 License

This project is developed for educational and portfolio purposes.

About

A machine learning project that predicts car prices using Linear Regression, Decision Tree, Random Forest, and Gradient Boosting with data preprocessing, feature engineering, EDA, model evaluation, and model persistence.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages