How divyanshichaturvedi/road-accident-severity-prediction works
This repository provides a Streamlit road-accident severity dashboard and a training pipeline. Training generates or reads accident records, encodes and scales features, fits and evaluates seven classifiers, and saves models and preprocessing artifacts. In the dashboard, users inspect accident data or enter conditions; the app loads saved artifacts, predicts severity, and presents probabilities and safety advice. The README documents the dashboard capabilities; unsampled app code limits detail about page routing and data visualizations.
Main entry points: app.py Streamlit dashboard · models Models and encoders · train_model.py Encoding and scaling · RTA Dataset.csv Accident dataset
Components 12
Data and training
- Training pipeline
train_model.py - Accident dataset
data/RTA Dataset.csv - Encoding and scaling
train_model.py - Classifier training
train_model.py - Model evaluation
train_model.py
Saved artifacts
- Models and encoders
models
Dashboard and prediction
- Streamlit dashboard
app.py - Data overview
app.py - Accident inputs
app.py - Severity prediction
app.py - Results and advice
app.py
Other components
- Dashboard user
Connections 15
- Training pipeline → Accident dataset: generates and saves
train_model.py - Training pipeline → Encoding and scaling: prepares features
train_model.py - Encoding and scaling → Classifier training: provides scaled data
train_model.py - Classifier training → Model evaluation: predicts test set
train_model.py - Classifier training → Models and encoders: saves classifiers
train_model.py - Encoding and scaling → Models and encoders: saves encoders and scaler
train_model.py - Model evaluation → Models and encoders: saves summary
train_model.py - Dashboard user → Streamlit dashboard: opens dashboard
README.md - Streamlit dashboard → Accident dataset: loads records
app.py - Streamlit dashboard → Models and encoders: loads artifacts
app.py - Streamlit dashboard → Data overview: shows data analysis
README.md - Dashboard user → Accident inputs: enters conditions
app.py - Accident inputs → Severity prediction: submits features
app.py - Streamlit dashboard → Severity prediction: predicts severity
app.py - Severity prediction → Results and advice: displays prediction
app.py