Skip to content

betting_combat.rounds.models.prep

The primary’s Bayes engine’s inputs (2026-10-26): trees take the inputs as they are; a linear model needs them on comparable, roughly symmetric scales. Every number is learned from the rows fit sees (the training rows) and only applied by transform: a test or live row’s prepared inputs depend on the training rows and on itself alone.

kinds read on the training rows: yes/no (two values), share (all in [0, 1]), signed (some below 0), amount (the rest; log(1 + x) where skewed, skew > 1) transform share -> log-odds (clipped to 0.5% - 99.5%); skewed amount -> log(1 + x); signed kept, and its size |x| added (the A - B gaps whose effect is U-shaped: a lopsided round either way raises the finish chance); yes/no and the rest kept missing the training median, + a ‘was missing’ flag where over 0.5% of the training rows miss it zeros + an ‘is zero’ flag for amounts zero on over 40% of the training rows scaling ‘standard’ (mean / sd), ‘median/IQR’, or ‘rank-to-normal’ (the training quantiles -> normal scores, clipped at +-8); columns constant on the training rows dropped

The research’s preparation (data/ufc/cito/assess/a15_engines.py, Prep), reproduced exactly.

Classes

InputPrep

Fit on the training rows’ inputs, then transform any rows with what was learned.

fit

fit(X: pd.DataFrame) -> InputPrep

groups

groups() -> np.ndarray

Each prepared column’s group, for the Bayes engine’s shrinkage: its family (the input name’s first word) x what it is (the value, its size, a missing flag, a zero flag).

transform

transform(X: pd.DataFrame) -> np.ndarray