|
|
--- |
|
|
license: mit |
|
|
language: |
|
|
- en |
|
|
pipeline_tag: tabular-classification |
|
|
library_name: keras |
|
|
tags: |
|
|
- tabular-classification |
|
|
- traffic |
|
|
- keras |
|
|
--- |
|
|
# TPnet-small |
|
|
|
|
|
TPnet-small is a lightweight deep neural network (DNN) designed to predict traffic congestion using tabular smart mobility features. It serves as a compact yet powerful alternative to tree-based models. |
|
|
|
|
|
## Model Details |
|
|
|
|
|
- **Model type**: Feedforward Deep Neural Network (3 hidden layers) |
|
|
- **Architecture**: [128, 64, 32] with ReLU activations and Dropout |
|
|
- **Output**: 3-class Softmax output (`High`, `Medium`, `Low`) |
|
|
- **Trained on**: Smart Mobility Traffic Dataset from Kaggle |
|
|
|
|
|
## Training Details |
|
|
|
|
|
- Optimizer: Adam |
|
|
- Loss: Sparse Categorical Crossentropy |
|
|
- Epochs: 50 |
|
|
- Batch size: 32 |
|
|
- Training time: ~6 seconds on CPU |
|
|
- Train Accuracy: 99.1% |
|
|
- Val Accuracy: 94.6% |
|
|
|
|
|
## Evaluation |
|
|
|
|
|
| Metric | Value | |
|
|
|----------|-------| |
|
|
| Accuracy | 94.5% | |
|
|
| F1 Score | 0.944 | |
|
|
| Parameters | 13,123 | |
|
|
| Model Size | ~156 KB (.h5 format) | |
|
|
|
|
|
Includes training trajectory and confusion matrix plots. |
|
|
|
|
|
## How to Use |
|
|
|
|
|
```python |
|
|
from tensorflow.keras.models import load_model |
|
|
|
|
|
model = load_model("traffic_predictor_dnn.h5") |
|
|
y_pred = model.predict(X_test) # X_test must be scaled [n_samples, 20] |
|
|
``` |
|
|
|
|
|
## Limitations |
|
|
|
|
|
- Performance limited by small dataset size and feature coverage |
|
|
|
|
|
- Currently optimized for CPU inference, not edge deployment |
|
|
|
|
|
|
|
|
## Authors |
|
|
|
|
|
- Created by [@Yukin3](https://github.com/Yukin3) |