Auto Evaluate is a machine learning project that predicts the price of used cars using Linear Regression. The model is trained on a dataset of 4009 car records sourced from Kaggle and aims to provide accurate price estimates based on various car features.
The goal of this project is to:
- Predict the resale price of used cars
- Understand how different features affect car pricing
- Build a complete ML pipeline from data preprocessing to deployment
- Python
- Pandas & NumPy – Data handling
- Matplotlib & Seaborn – Data visualization
- Scikit-learn – Model building & evaluation
- Flask – Backend API
- HTML/CSS/JS – Frontend (if applicable)
- Pickle – Model serialization
-
Source: Kaggle
-
Size: 4009 rows
-
🔗 Dataset Link: [Used Car Prices uploaded by: Taeef Najib]
-
Contains features like:
- Car brand/model
- Year of manufacture
- Fuel type
- Transmission
- Mileage
- Engine capacity
- Price (target variable)
- Removed unwanted characters from columns (e.g., price formatting)
- Converted data types using
pd.to_numeric() - Handled missing values
-
Applied encoding techniques:
- One-hot encoding for low-cardinality features
- Target encoding for high-cardinality features (like model)
-
Dropped irrelevant columns
- Feature scaling using StandardScaler
- Train-test split
- Used Linear Regression
- Trained model on processed data
-
Evaluated using:
- R² Score (model performance)
- MAE (Mean Absolute Error) (prediction error)
- Saved model using pickle
- Built a Flask API to serve predictions
- Connected frontend with backend
- R² Score: 0.7322964983528121
- MAE: 6700.119108045312
git clone https://github.com/your-username/AutoValuate.git
cd AutoValuatepip install -r requirements.txtpython app.pyhttp://127.0.0.1:5000
- User inputs car details
- Data is preprocessed
- Model predicts log(price)
- Converted back using
exp()transformation - Final price displayed
- Handling skewed price data
- Dealing with high cardinality features
- Avoiding negative or zero predictions
- Maintaining consistency between training and deployment pipeline
- Use advanced models (Random Forest, XGBoost)
- Improve feature engineering
- Add more real-time data
- Deploy on cloud (AWS/Render)
- Kaggle for dataset
- Scikit-learn documentation
- Open-source community
This project is built for learning purposes and demonstrates a complete end-to-end machine learning pipeline. Flow: AUTO EVALUATE – ML PIPELINE FLOW (USED CAR PRICE PREDICTION)
- DATA COLLECTION
- Dataset of 4009 used cars taken from Kaggle
- Contains features like model, year, fuel type, transmission, mileage, etc.
- DATA LOADING
- Load dataset using pandas (read_csv)
- Inspect data using head(), info(), describe()
- DATA CLEANING
- Remove unwanted characters (e.g., ₹, commas in price/mileage)
- Convert columns to numeric using pd.to_numeric()
- Handle missing values (drop or fill using median/mean)
- Fix column names (remove spaces, lowercase if needed)
- EXPLORATORY DATA ANALYSIS (EDA)
- Check distribution of price (usually right-skewed)
- Identify outliers
- Analyze relationships between features and price
- Use plots (histogram, scatterplot, heatmap)
- TARGET TRANSFORMATION
- Apply log transformation on price to handle skewness: y = log1p(price)
- Helps improve model performance
- FEATURE ENGINEERING
- Handle categorical variables: a. One-Hot Encoding → for low-cardinality columns b. Target Encoding → for high-cardinality columns (e.g., model)
- Drop unnecessary columns
- FEATURE SCALING
- Apply StandardScaler to normalize feature values
- Ensures all features are on similar scale
- TRAIN-TEST SPLIT
- Split dataset into training and testing sets
- Typically 80% training, 20% testing
- MODEL BUILDING
- Use Linear Regression model from sklearn
- Train model on X_train and y_train
- MODEL PREDICTION
- Predict on X_test
- Predictions are in log scale
- INVERSE TRANSFORMATION
- Convert predictions back to original price: price = expm1(predicted_log_value)
- MODEL EVALUATION
- R² Score → measures goodness of fit
- MAE (Mean Absolute Error) → average prediction error
- MODEL SERIALIZATION
- Save trained model using pickle
- Also save scaler and encoders if used
- DEPLOYMENT (FLASK)
- Create Flask API
- Load model using pickle
- Take user input from frontend
- Apply same preprocessing steps
- Predict price and return result
- FRONTEND INTEGRATION
- User inputs car details
- Sends request to Flask backend
- Displays predicted price
END OF PIPELINE








