betting_combat.rounds.models.meta_round
The meta model (2026-10-26): the primary model’s probabilities at the bell, corrected by what the
Kalshi markets know at that moment. (Until 2026-10-26 this module held the bet-level meta model of
today’s strategies; it is now models.meta_bets.)
rows the primary’s rows (round starts 2+, models.primary) at the market’s bell — the
live decision’s instant (a break without the market’s bell has no live counterpart)
first guess the primary’s five outcomes of this round (A by KO, A by submission, B by KO, B by
submission, no finish)
inputs INPUTS (25): the primary’s fight from here (joint.cells: who wins, decision,
KO, submission, A / B by KO / submission / decision; f_) and the market minus the
primary on the matched events (e_): this round ends (the ‘ends before round k+2’
market), the winner, the distance, the method of finish, the method of victory, the
victory in this round
model a linear correction of the first guess’s log-probabilities: multinomial, the inputs
standardised on the training rows (missing = the training mean), L2 penalty
PENALTY
Each piece chosen out of sample on the 373 development round starts (28 cards, 2026-01-24 to
2026-09-27; purged 10-fold over cards, fighter purge, 28-day embargo; nested wherever chosen): the y
(the five outcomes best on ‘ends this round’ and KO), the family (the linear correction beat every
tree setting and the primary alone; honest nested estimate 2.7% lower log loss than the primary), the
inputs (removal / addition by block: the primary’s this-round probabilities and the market’s raw
prices go — they are the first guess and inside the edges — and nothing else earned a place), the
penalty (re-checked on the inputs). Out of sample, ranking % primary -> meta: ends this round 62.2 ->
65.0, KO 71.4 -> 74.3, A finishes 60.8 -> 67.7, A vs B given it ended 69.5 -> 76.6; lower log loss on
every question; the holdout (32 round starts, looked at once) too. Research:
data/ufc/cito/assess/meta/ (m01-m05).
Built like the primary (study step 6, m06/m06b): this correction as the start, and as inputs, of LightGBM trees on top (cross-fitted: a training row’s start from a fit that never saw it), its Bayes version (the whole posterior averaged) likewise, and every other input block. On 373 rows no tree count, setting or block beat the linear correction alone by the bar (lower overall and in 7 of 10 folds); nested, letting the trees in cost 0.4 points (3.0% vs 3.4% lower log loss than the primary) and the Bayes version averaged its probabilities flatter (2.3%). So: no trees yet; re-run the test as the cards add rows.
Classes
MetaModel
The linear correction of the first guess (module docstring). fit then predict.
fit
fit(X: pd.DataFrame, y: np.ndarray, log_prior: np.ndarray) -> MetaModelX: INPUTS; y: the outcome codes (0..4 in CELLS order); log_prior:
first_guess. L-BFGS from no correction.
predict
predict(X: pd.DataFrame, log_prior: np.ndarray) -> np.ndarrayThe five outcomes (CELLS order) for each row.
Functions
first_guess
first_guess(round_probs: pd.DataFrame) -> np.ndarrayThe primary’s five outcomes of this round (columns CELLS) as log-probabilities.
meta_inputs
meta_inputs(round_probs: pd.DataFrame, fight: pd.DataFrame, books: Mapping[str, pd.Series]) -> pd.DataFrameINPUTS for each row: round_probs the primary’s five outcomes of this round
(CELLS); fight the primary’s fight from here (joint.cells’ columns, FIGHT);
books the markets’ mids at the bell by name — ‘end’ (this round’s ‘ends before round k+2’),
‘win_a’, ‘distance’, ‘mof_ko’ / ‘mof_sub’ / ‘mof_dec’, ‘mov_<a|b>_<ko|sub|dec>’, ‘vic_a’ /
‘vic_b’ (this round’s victory markets); NaN where a market is not quoted.