A machine learning project that predicts the driving range of electric vehicles (EVs) based on various input features such as battery capacity, motor power, vehicle weight, and efficiency parameters.
This project aims to provide a predictive model for estimating the range of electric vehicles.
It can help users, manufacturers, and enthusiasts estimate the driving distance of an EV under different conditions.
- Title:
Electric Vehicle Specs Dataset (2025) - Author:
Urvish Ahir - Link:
https://www.kaggle.com/datasets/urvishahir/electric-vehicle-specifications-dataset-2025 - Number of entries:
1000 - Columns include
[Battery Capacity, Motor Power, Drivetrain, Efficiency, etc.]
The model uses the following features to predict EV range:
- Top Speed (Kmh)
- Battery Capacity (kWh)
- Number of cells
- Torque (nM)
- Acceleration (0-100, s)
- Fast charging Power (kW/dc)
- Towing capacity (kg)
- Motor Power (kW)
- Cargo Volume (L)
- Drivetrain (FWD/RWD/AWD)
- Segment
- Body type
- Vehicle Weight (kg)
- Efficiency (Wh/km)
- Model type:
Random Forest - Programming language: Python
- Libraries:
pandas,numpy,scikit-learn,[Optional: matplotlib, seaborn]
- Clone the repository:
git clone https://github.com/yourusername/ev-range-predictor.git
- Install required packages:
pip install -r requirements.txt
- Run the prediction script:
python predict_range.py
- Input vehicle parameters and get the predicted range.
The model is evaluated using standard regression metrics:
- Mean Absolute Error (MAE):
13.458 - Mean Squared Error (MSE):
362.729 - Root Mean Squared Error (RMSE):
19.045 - R² Score:
0.965
from sklearn.ensemble import RandomForestRegressor
model = RandomForestRegressor(n_estimators=100, random_state=42)
model.fit(X_train, y_train)
y_pred = model.predict(X_test)- Include more features such as driving conditions, temperature, and load.
- Improve model accuracy using advanced algorithms or neural networks.
- Deploy as a web app or mobile app for interactive predictions.
This project is licensed under the GNU General Public v3.0 License.