YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

XGSupply - Supply Chain Demand Predictor

Model Description

This is a global XGBoost regression model designed to predict upcoming demand (daily units sold) for supply chain management. It enables proactive inventory management by identifying potential stockouts and overstock situations across various product categories.

Performance Metrics

The model was evaluated using a chronological 20% test split to simulate real-world forecasting conditions.

Metric Value
Mean Absolute Error (MAE) 53.18
Root Mean Squared Error (RMSE) 82.90

XGSupply - Deployment Guide

Data Requirements

To use this model, your raw input data must contain the following columns:

  • date: Format YYYY-MM-DD
  • sku_id: Unique identifier for the product
  • category: Product category (e.g., Snacks, Beverages)
  • units_sold: Historical daily sales (needed for rolling averages)
  • units_received: Daily inventory replenishment quantity
  • closing_stock: End-of-day inventory level
  • lead_time_days: Supplier delivery time in days

Mandatory History

Because the model uses a 30-day rolling average, you must provide at least 30 days of historical data for a specific SKU to get the most accurate predictions. If history is shorter, the pipeline will fill missing values with 0.

Automated Preprocessing

We have provided inference_utils.py to handle all feature engineering (Temporal, Rolling, Lag, and Scaling) automatically.

Quick Start Inference

from huggingface_hub import hf_hub_download
import joblib
from inference_utils import preprocess_for_inference

# Download artifacts
repo = "alfiinyang/XGSupply"
model = joblib.load(hf_hub_download(repo, "xgboost_supply_model.joblib"))
hf_hub_download(repo, "training_feature_names.joblib", local_dir=".")
hf_hub_download(repo, "scaled_column_names.joblib", local_dir=".")

# Preprocess and Predict
X_processed = preprocess_for_inference(your_raw_dataframe, scaler_path=hf_hub_download(repo, "scaler.joblib"))
predictions = model.predict(X_processed)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support