Skip to content

A machine learning project that predicts the driving range of electric vehicles (EVs) based on their features.

License

Notifications You must be signed in to change notification settings

aih-2012/EV-Range-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EV Range Prediction Model 🚗🔋

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.


Table of Contents


Project Overview

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.


Dataset

  • 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.]

Features

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

  • Model type: Random Forest
  • Programming language: Python
  • Libraries: pandas, numpy, scikit-learn, [Optional: matplotlib, seaborn]

Usage

  1. Clone the repository:
git clone https://github.com/yourusername/ev-range-predictor.git
  1. Install required packages:
pip install -r requirements.txt
  1. Run the prediction script:
python predict_range.py
  1. Input vehicle parameters and get the predicted range.

Evaluation Metrics

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

Example Code Snippet

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)

Future Work

  • 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.

License

This project is licensed under the GNU General Public v3.0 License.

About

A machine learning project that predicts the driving range of electric vehicles (EVs) based on their features.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published