EV Battery SoH
Server-side machine learning dashboard for final engineering project presentation
Data leakage control
Battery_Status is excluded because it may reveal information derived from the target variable.

Pipeline Flow

1

Load dataset

The Python backend reads data/ev_battery_degradation_v1.csv from the server filesystem.

2

Check missing values

Missing values are counted and numeric/categorical imputers are configured for robust model input.

3

Check duplicates

Duplicate rows are counted to explain dataset quality before modeling.

4

Exclude identifier and leakage columns

Vehicle_ID and Battery_Status are removed by default.

5

Separate target variable

SoH_Percent is separated from input features as the regression target.

6

Encode categorical variables

Car_Model, Battery_Type, and Driving_Style are transformed with one-hot encoding.

7

Split train/test

The default split is 80% training and 20% testing with random_state 42.

8

Train and evaluate models

Random Forest and XGBoost are trained on the server and evaluated with MAE, RMSE, and R².

Concept Explanations

Preprocessing

Preprocessing converts raw dataset columns into a reliable matrix that machine learning models can use.

One-hot encoding

One-hot encoding turns categories into numeric indicator columns, such as Battery_Type_LFP and Battery_Type_NMC.

Train/test split

The model learns from training data and is evaluated on test data it did not see during training.

Data leakage

Data leakage happens when a model receives information that would not be available during a real prediction.