Skip to content

betting_combat.rounds.models.primary

The primary model (layer 1 v2, 2026-10-26): the round model at every break from round 2 on, reading the round stats; its out-of-sample probabilities feed the meta model (models.meta: one row per bet). Same build as today’s layer 1 (joint.JointRoundModel): the prior from the clock, the market’s winner and the KO share, LightGBM learning the correction of the five outcomes of the round (A by KO, A by submission, B by KO, B by submission, no finish). What changed, each decided out of sample (purged 10-fold over cards, fighter purge, 28-day embargo; nested wherever chosen):

rows the round starts from round 2 on (rounds_from; round 1 has no round stats: today’s layer 1 keeps it) clock Group 5 v2 (features.clock_v2): p0 from the market’s price (Kalshi live), the KO share from the market’s, the Bayes curve refitted before every card features FINAL_FEATURES (202): the round context, today’s layer-1 pre-fight features, the last round’s 22 stats as A / B / A-B / A+B (features.breaks), the other matchup features, the fight so far’s knockdowns and the clock’s own values settings TREE_PRIMARY: 3 leaves, at least 100 rows a leaf, half the columns a tree, 200 trees

Out of sample on 2025-26 (like live), ranking %, today’s layer 1 -> the primary: ends this round 60.1 -> 63.1, KO 61.7 -> 67.8, submission 57.6 -> 67.4, KO vs submission given it ended 60.7 -> 74.9, A vs B given it ended 73.4 -> 76.8; rounds ended 224, expected 201 -> 221. Research: data/ufc/cito/assess/job/ (README.md; the configuration: out/v2/final_features.json).

Two engines (PrimaryModel, 2026-10-26): the research phase on model types ran one standard version of each engine on the same rows, inputs, start and purged 10-fold (a16_one_each.py): LightGBM 0.654 five-outcome log loss; XGBoost, EBM, CatBoost and an L2 softmax worse; the Bayes engine (bayes_softmax.BayesSoftmax, a Bayesian multinomial logistic on the prepared inputs, prep.InputPrep) 0.654, a tie. The two averaged: 0.652, better than LightGBM in 9 of 10 folds and the Bayes engine in 8 of 10, and in every era (2008-14, 2015-19, 2020-26). So every round probability (this round’s and every later round’s, the fight-from-here grid included) is the average of the two engines’ (BLEND 0.5, fixed, not tuned). Production: one fit on every row before the cutoff, refitted at every refit (the preparation and both engines refitted together, on the training rows only).

Classes

PrimaryModel

Bases: JointRoundModel

The joint round model with two engines: LightGBM (JointRoundModel’s round model) and the Bayes engine on the prepared inputs, both correcting the same start; every round probability is their average (blend: the Bayes engine’s weight; 0 = LightGBM alone, no Bayes fit).

engine

engine(which: Engine) -> PrimaryModel

The same fitted model read through one engine (‘lightgbm’, ‘bayes’) or the average (‘primary’): its round probabilities, grid and cells (joint.cells).

fit

fit(train: pd.DataFrame) -> PrimaryModel

JointRoundModel.fit (LightGBM on round_rows), then the preparation and the Bayes engine on the same rows, the same outcomes and the same start.

refit

refit(rows: pd.DataFrame, before: Any = None, blend: float = BLEND, stats: bool = True) -> PrimaryModel

The live refit: the primary fitted on every priced row (training.clocked: the clock and the market’s start known) dated before before (None: every row) - what the card dated before trades on.

walk_forward

walk_forward(rows: pd.DataFrame, cards: Any, blend: float = BLEND, stats: bool = True) -> Any

Each card in cards (dates, in order) with the primary refitted on every row before it (refit): (card date, fitted model) pairs, one at a time.

Functions

primary

primary(blend: float = BLEND, stats: bool = True) -> PrimaryModel

An unfitted primary model (fit it on the clocked, priced rows of Dataset 1 v2: the league KO share from every round-1 row, both engines on the rounds-2+ rows). blend 0: LightGBM alone (no Bayes fit). stats False: the variant without the round statistics (ROUND_STATS: the last round’s and the fight so far’s) - the same build on what is known at a break without a live stats feed.