TPnet-baseline / README.md
Yukin3's picture
Update README.md
dfc3d36 verified
---
license: mit
language:
- en
pipeline_tag: tabular-classification
library_name: sklearn
tags:
- traffic
- sklearn
- tabular-classification
---
# TPnet-baseline
TPnet-baseline is a Random Forest classifier trained on smart mobility and traffic features to predict traffic congestion levels (Low, Medium, High) in urban environments.
## Model Details
- **Model type**: Random Forest Classifier
- **Input features**: 20 numerical features including vehicle count, road occupancy, weather, traffic light status, time-of-day, and more
- **Output**: Multiclass classification – `High`, `Medium`, `Low` traffic congestion
- **License**: MIT
- **Trained on**: Smart Mobility Traffic Dataset from Kaggle
## Training Details
- Train/test split: 80/20
- Accuracy (test): 99.9%
- F1 Score: 0.999
- Class-balanced via stratified sampling
- No overfitting observed
## Evaluation
| Metric | Value |
|------------|--------|
| Accuracy | 99.9% |
| F1 Score | 0.999 |
| Model Size | ~1.2MB |
Confusion matrix and full report are available in the repository.
## How to Use
```python
import pickle
with open("traffic_predictor_rf.pkl", "rb") as f:
model = pickle.load(f)
y_pred = model.predict(X_test) # where X_test is a [n_samples, 20] array
```
## Limitations
- Does not account for live data
- Designed for offline batch inference
- Assumes all 20 features are properly preprocessed and scaled
## Authors
- Created by [@Yukin3](https://github.com/Yukin3)