Skip to content

naveenk-DS/Car_Price_prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

53 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš— Car Price Prediction

This project predicts car prices based on various features using machine learning techniques such as Linear Regression. It's a beginner-friendly project for Data Science learners.


πŸ“Œ Problem Statement

Estimate the price of a used car based on features like year, present price, number of owners, fuel type, seller type, and transmission.


🧠 Algorithms Used

  • Linear Regression
  • Random Forest (optional advanced version)

πŸ› οΈ Tech Stack

  • Python
  • Pandas
  • NumPy
  • Matplotlib / Seaborn
  • Scikit-learn

πŸ“Š Dataset

The dataset used is car_data.csv, which contains the following columns:

  • Car_Name
  • Year
  • Selling_Price
  • Present_Price
  • Kms_Driven
  • Fuel_Type
  • Seller_Type
  • Transmission
  • Owner

πŸ” EDA (Exploratory Data Analysis)

  • Removed car names for modeling.
  • Converted categorical variables (Fuel Type, Seller Type, Transmission) to dummy variables.
  • Created a new column: Car_Age = Current Year - Year.

πŸ§ͺ Model Building

python

from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split from sklearn.metrics import r2_score

model = LinearRegression() X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)

model.fit(X_train, y_train) pred = model.predict(X_test) r2_score(y_test, pred)

βœ… Results

RΒ² Score: ~0.85

The model works well for price estimation but can be improved using ensemble methods.

πŸ“¦ Installation

bash Copy Edit git clone (https://github.com/naveenk-DS/Car_Price_prediction) cd car-price-prediction pip install -r requirements.txt

πŸ’‘ Future Improvements

Add more models (Random Forest, XGBoost).

Deploy using Flask or Streamlit.

Use a larger dataset for better accuracy.

🀝 Contributing

Feel free to fork this repo, improve the model or add a UI, and submit a pull request!

πŸ“§ Contact

Created by Naveen πŸ“§ Email: naveends6k@gmail.com


βœ… Sample requirements.txt

txt

numpy pandas scikit-learn matplotlib seaborn

About

πŸš— Car Price Prediction This project predicts car prices based on various features using machine learning techniques such as Linear Regression. It's a beginner-friendly project for Data Science learners.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors