This is a Supervised Machine Learning based model. Algorithms used in this model are:
- Linear Regression
- SVR
- KNN
- Decision Tree
- Random Forest for Regression
- GridSearch CV on Random Forest
Here, Selling Price of a used car is predicted on the basis of given features like Year, Present Price, Kms Driven, Transmission mode, Seller Type, Fuel Type and owner.
The R2 score and RMSE value from different models are found to be:
The R2 Score,Bias & RMSE value for Linear Regression is 0.6576364489340596 , 9.0 & 3.05629557865939 respectively.
The R2 Score,Bias & RMSE value for SVR is -0.06230577764424439 , 29.0 & 5.383644370018745 respectively.
The R2 Score,Bias & RMSE value for KNN is 0.002453284381575438 , 27.0 & 5.216968488886138 respectively.
The R2 Score,Bias & RMSE value for Decision Tree Regressor is 0.7438270965512692 , 7.0 & 2.643736623291612 respectively.
The R2 Score,Bias & RMSE value for Random Forest is 0.8733907611265234 , 3.0 & 1.8585929737237548 respectively.
The R2 Score,Bias & RMSE value for GridSearch CV on Random Forest is 0.9033470958982315 , 3.0 & 1.6238991176931048 respectively.
Load the file car.csv from the model folder.
- Python
- FastAPI
- Sklearn
- Uvicorn
- Pandas
- Heroku Cli
├── model/CarPricePrediction # machine learning model is here
├── model/model.pkl # pickle file for GridSearch Cv on Random Forest Regressor
├── main.py # API is here for ML Model
├── schemas.py # schema of model
├── requirements.txt # packages needed to install
Documentation: https://fastapi.tiangolo.com
Source Code: https://github.com/tiangolo/fastapi
FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.
Now go to http://127.0.0.1:8000/docs.
You will see the automatic interactive API documentation (provided by Swagger UI):
The Heroku CLI is used to manage Heroku apps from the command line. It is built using oclif.
For more about Heroku see https://www.heroku.com/home
To get started see https://devcenter.heroku.com/start
https://usedcarprice-predictor.herokuapp.com/docs
- Clone this repo.
create virtualenv (your environment name)
pip install -r requirements.txt
- Make Changes
- Create the Pull request
- Wait for a day to get your changes merged if useful.