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.
Confusion matrix and full report are available in the repository.
1import pickle
2
3with open("traffic_predictor_rf.pkl", "rb") as f:
4 model = pickle.load(f)
5
6y_pred = model.predict(X_test) # where X_test is a [n_samples, 20] array
-
Does not account for live data
-
Designed for offline batch inference
-
Assumes all 20 features are properly preprocessed and scaled