File size: 1,490 Bytes
890bae1 3f03e68 dfc3d36 890bae1 3f03e68 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | ---
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) |