An end-to-end Machine Learning model trained on Project_Final_Dataset_CarID_Updated.xlsx that predicts an Electric Vehicle's (EV) remaining driving range in kilometers based on:
- Manufacturer (Brand) & Model (with catalog lookup of battery capacity in kWh)
- Current State of Charge / Battery Level (%)
ML_EV/
├── Project_Final_Dataset_CarID_Updated.xlsx # Official EV Fleet Dataset (10,000 trips across 50 models)
├── EV_Range_Prediction_Model.ipynb # Jupyter Notebook (EDA, data1 schema, ML modeling, evaluation)
├── train_model.py # Python ML training & export script
├── predict.py # CLI & Python inference utility
├── ev_range_model.pkl # Serialized trained model & vehicle catalog package
├── requirements.txt # Python dependencies
└── README.md # Project documentation
Predict remaining range via command line:
# Predict for a specific brand and model
python predict.py --brand Tata --model "Punch EV" --battery 75
# List all supported EV manufacturers
python predict.py --list-brands
# List all models for a manufacturer
python predict.py --list-models Tataimport pickle
# Load the trained ML model package
with open("ev_range_model.pkl", "rb") as f:
model_payload = pickle.load(f)
pipeline = model_payload["pipeline"]
# Run inference directly
# (Pass a DataFrame matching the data1 feature columns)To re-train on Project_Final_Dataset_CarID_Updated.xlsx and export a fresh .pkl:
python train_model.pyOpen and explore EV_Range_Prediction_Model.ipynb in VS Code / Antigravity using the Python 3.14.6 kernel.
| Column | Description | Type |
|---|---|---|
Range |
Remaining Driving Range in km | Target ( |
Battery Level (%) |
Current battery percentage | Feature ( |
Make |
Vehicle Manufacturer | Feature ( |
Acceleration 0 - 100 km/h |
0-100 km/h time (s) | Feature ( |
Top Speed |
Top speed (km/h) | Feature ( |
ER |
Full Electric Range (km) | Feature ( |
Total Power |
Motor power (kW) | Feature ( |
Total Torque |
Motor torque (Nm) | Feature ( |
Drive |
Driver behaviour style | Feature ( |
BC |
Battery capacity (kWh) | Feature ( |
Length, Width, Height, Wheelbase
|
Vehicle dimensions (mm) | Features ( |
Gross Vehicle Weight (GVWR) |
Vehicle weight (kg) | Feature ( |
Max. Payload |
Maximum payload capacity (kg) | Feature ( |
Cargo Volume |
Cargo space (L) | Feature ( |
| Model Algorithm |
|
MAE (km) | RMSE (km) |
|---|---|---|---|
| Gradient Boosting Regressor | 0.8960 | 23.25 km | 29.93 km |
| Random Forest Regressor | 0.8794 | 24.31 km | 32.24 km |
| XGBoost Regressor | 0.8751 | 24.71 km | 32.81 km |
| Linear Regression | 0.8593 | 27.61 km | 34.82 km |