Mannequin Coaching Pack
Bought the Mannequin Coaching Pack however undecided methods to use it? This step-by-step information exhibits you methods to load your saved mannequin, get the precise information from the CFBD API, and begin making predictions, plus how Tier 3 weekly CSV drops can prevent hours.
Since launching the Mannequin Coaching Pack, one of many prime questions I’ve heard is:
“I’ve bought the skilled mannequin… now what?”
If that’s you, this information is for you.We’ll stroll by way of:
What sort of information your mannequin must make predictions.The place to get that information from the CollegeFootballData API.How one can load various kinds of fashions from the pack and run predictions.How one can skip the info prep completely with Tier 3 weekly CSV drops.
1. What Your Mannequin Wants
The fashions within the coaching pack have been all constructed on feature-ready CSV information.
Meaning:
The CSV has the very same columns because the coaching information.The columns are in the identical order.The numbers are calculated the identical means (e.g., utilizing stats from video games earlier than the sport you’re making an attempt to foretell).In case your CSV doesn’t match, your mannequin will throw errors or give unhealthy predictions.
2. Two Methods to Get the Information
Possibility 1: Construct it your self
You’ll be able to pull comparable information from the CollegeFootballData API.Listed below are the endpoints you’d use, at a excessive stage:
Function Group
API Endpoint
Key Fields
Opponent-adjusted staff metrics
/wepa/staff/season
epa.*, epa_allowed.*, successRate.*, successRateAllowed.*
Superior staff metrics (non-opponent-adjusted)
/stats/season/superior
havoc, fieldPosition, pointsPerOpportunity
Recreation metadata
/video games
week, homeTeam, awayTeam, neutralSite
Betting information
/traces
traces[*].unfold
Talen composite
/expertise
expertise
Observe: In the event you construct your individual CSV, you’ll want to hitch these datasets collectively and ensure your stats solely embrace video games earlier than the prediction week.
Possibility 2: Skip the work
Beginning Week 5, Tier 3 patrons will get a weekly CSV that already:
Has all the precise columns.Is within the right order.Makes use of stats from video games earlier than that week.
With that file, you’ll be able to go straight to loading your mannequin and working predictions.
3. Loading and Predicting
Upon getting your CSV, right here’s methods to use it with every kind of mannequin from the pack.Substitute “week5_features.csv” together with your file and “path/to/mannequin” together with your mannequin file.
Random Forest / Regression (scikit-learn)
import pandas as pd, joblib
# Load your options
X_live = pd.read_csv(“week5_features.csv”)
# Load your mannequin
mannequin = joblib.load(“fashions/sklearn_rf.pkl”)
# Make predictions
preds = mannequin.predict(X_live)
X_live[‘prediction’] = preds
XGBoost
import pandas as pd, xgboost as xgb
# Load your options
X_live = pd.read_csv(“week5_features.csv”)
# Load your mannequin
mannequin = joblib.load(“fashions/xgb_model.pkl”)
# Make predictions
preds = mannequin.predict_proba(X_live)[:, 1]
X_live[‘prediction’] = preds
fastai (tabular)
import pandas as pd
from fastai.tabular.all import load_learner
# Load your options
cat_features = […] # record out categorical options
cont_features = […] # record out steady options
X_live = pd.read_csv(“week5_features.csv”)
X_live = X_live[cat_features + cont_features]
# Load your mannequin
study = load_learner(“fashions/fastai_model.pkl”)
dls = study.dls.test_dl(X_live)
# Make predictions
batch_preds = study.get_preds(dl=dls)[0].numpy()
X_live[‘prediction’] = batch_preds
4. Widespread Gotchas
Unsuitable column order → reorder to match your coaching information earlier than predicting.
Lacking columns → be sure your CSV consists of all the pieces from coaching.
Unsuitable information sorts → convert strings to numbers the place wanted.
fastai class mismatch → your classes should match what the mannequin was skilled on.
5. The Quick Lane
If you wish to:
Keep away from merging a number of datasets,Skip determining lag logic, andBe certain your columns match completely…
…be a part of Tier 3 on Patreon.Each week beginning in Week 5, you’ll get a CSV that’s able to feed immediately into your mannequin.
Be part of Tier 3 right here →
6. Your Subsequent Steps
Choose one among your fashions from the pack.Seize a CSV, both your individual or from the pack, and run the code above to check.Get your arms on current-season options (DIY or Tier 3) and begin making actual predictions.
Backside line:In the event you can construct the CSV your self, nice. You now know precisely what your mannequin wants.If you wish to skip the grunt work and begin predicting in minutes, Tier 3’s weekly CSV drops are your quickest path.
Free publication updates
Hold the helpful context coming
Substantive tutorials and product notes, with no fastened schedule.






