Downloads · 30 days
0
yash441alt/dataco-supply-chain-delay-prediction
dataco-supply-chain-delay-prediction is a machine learning model from yash441alt. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This repository contains the trained classification model, feature engineering pipelines, exploratory notebooks, and database integration schemas for predicting supply chain shipment delays.
Downloads · 30 days
0
Access
Public
Updated Jul 20, 2026
Repo size
4.2 MB
Likes
0
Public
Click a slice to open those files.
.json5.9 MB · 62%
From the Hugging Face model README
This repository contains the trained classification model, feature engineering pipelines, exploratory notebooks, and database integration schemas for predicting supply chain shipment delays.
The predictive model was trained on the DataCo Supply Chain dataset (excluding post-shipment features to avoid data leakage):
days_for_shipping_scheduled (36.6%) - The scheduled shipping window constraint.shipping_mode (33.6%) - Shipping level (First Class, Second Class, Same Day, Standard).type (2.8%) - Payment type (Debit, Transfer, Cash, etc.).order_hour (2.5%) - Time of day the order was placed.├── Models/
│ ├── best_xgb_model.json (XGBoost model structure)
│ ├── best_xgb_model.pkl (XGBoost model pickle)
│ ├── label_encoders.pkl (Categorical feature encoders)
│ └── scaler.pkl (Feature scaling parameters)
├── Scripts/
│ ├── data_cleaning.py (Preprocessing logic)
│ ├── database_loader.py (MySQL database bulk uploader)
│ └── model_training.py (Machine learning pipeline)
├── Notebooks/
│ ├── 1_Data_Cleaning_EDA.ipynb (EDA & SQL queries)
│ └── 2_Delay_Prediction_ML.ipynb (Machine learning experiments)
├── SQL/
│ ├── schema.sql (MySQL 3NF schema definitions)
│ └── analysis_queries.sql (Analytical queries)
├── requirements.txt (Python dependencies)
└── PowerBI_Design_Guide.md (Power BI visualization layout design blueprint)
Ensure you have the required libraries installed:
pip install -r requirements.txt
import pickle
import pandas as pd
# Load encoders, scaler, and model
with open("Models/label_encoders.pkl", "rb") as f:
encoders = pickle.load(f)
with open("Models/scaler.pkl", "rb") as f:
scaler = pickle.load(f)
with open("Models/best_xgb_model.pkl", "rb") as f:
model = pickle.load(f)
# Example: Make a prediction (ensure feature engineering matches model_training.py)
# predictions = model.predict(X_scaled)