This project predicts the prices of used cars based on features such as car make, year of manufacture, fuel type, and kilometers driven. The project utilizes machine learning algorithms to analyze the dataset and generate accurate predictions.
This repository contains all the code and resources for this project.
- Data Loading and Exploration
- Load the car dataset (
car data.csv) and perform initial exploration.
- Load the car dataset (
- Data Cleaning
- Handle missing values (if any), encode categorical data, and prepare the dataset for modeling.
- Feature Engineering
- Create meaningful features for the machine learning model.
- Model Development
- Train machine learning models to predict car prices.
- Evaluate model performance using metrics like R² score and mean squared error.
- Model Optimization
- Fine-tune hyperparameters and improve accuracy.
- Prediction
- Use the trained model to predict car prices for new data.
The code for this project is available in the file:
- Car_Price_Prediction.ipynb
- Programming Language: Python 3.10
- Development Environments: Jupyter Notebook / Google Colab
- Key Libraries:
- pandas (
pip install pandas) - scikit-learn (
pip install scikit-learn)
- pandas (
The dataset used in this project is:
- car data.csv: A dataset containing 301 records of used cars with attributes such as
Year,Selling Price,Present Price,Fuel Type, etc.
The key features in the dataset include:
- Year: Year of manufacture
- Selling_Price: Price at which the car is sold
- Present_Price: Current price of the car
- Kms_Driven: Distance driven by the car in kilometers
- Fuel_Type: Type of fuel used (Petrol/Diesel/CNG)
- Seller_Type: Dealer or individual
- Transmission: Manual or Automatic
- Owner: Number of previous owners
To set up the environment for this project:
- Install Python 3.10 or later.
- Install required libraries using pip:
pip install pandas scikit-learn