How to use from the
Use from the
Scikit-learn library
from huggingface_hub import hf_hub_download
import joblib
model = joblib.load(
	hf_hub_download("Yukin3/TPnet-baseline", "sklearn_model.joblib")
)
# only load pickle files from sources you trust
# read more about it here https://skops.readthedocs.io/en/stable/persistence.html

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

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

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support