Skip to content

betting_combat.rounds.features.dataset_v2

Dataset 1 v2 - the primary’s rows (models.primary): Dataset 1 with layer 1’s clock rebuilt on the market’s prices and the round statistics. Port of the research job’s steps 3 and 5 (data/ufc/cito/assess/job: j03_p0.py, j05_clock.py), identical numbers.

market ``props.market_frame``: per fight the market's P(goes the distance), P(KO | finish)
and their source (Kalshi / the sportsbook)
p0, KO ``clock_v2.GoesDistanceModel`` / ``KoShareModel`` walked card by card (each card's
fights priced by the models fitted on the fights before it)
clock per card the Bayes curve fitted on every finish before it (``clock_v2.CardClock``),
its rows priced through ``ClockFeatures.curve_columns``: m_p0, m_S_1..4,
m_clock_S, m_p_dec_now, m_p_finish_round; m_p_dec_prefight = the history-only p0
columns Dataset 1's clock columns replaced; ``ko_share`` added; on Kalshi-priced fights the
market's own prices as book_p_dec / book_p_sub / book_p_ko (what live has); the
round statistics (``breaks.BreakStats.official``: the last round's and the fight
so far's, on the live scale) merged on (fight_id, round_idx)

Curves are the slow part (one Bayes fit per card): card_curve fits one, build takes them fitted (services.rounds_cache.CardCurves caches them per card).

Functions

build

build(dataset1: pd.DataFrame, raw: RawData, fight_table: pd.DataFrame, market: pd.DataFrame, priced: pd.DataFrame, curves: Mapping[pd.Timestamp, Any]) -> pd.DataFrame

Dataset 1 v2 (the module doc). fight_table: ClockFeatures.fight_table; market: props.market_frame; priced: walks; curves: card date -> its fitted curve (every date of dataset1).

card_curve

card_curve(cf: ClockFeatures, fight_table: pd.DataFrame, date: pd.Timestamp) -> Any

The Bayes finish-time curve for the card dated date: fitted on every finish before it (seed: the date as YYYYMMDD).

card_dates

card_dates(dataset1: pd.DataFrame) -> list[pd.Timestamp]

walks

walks(raw: RawData, profiles: pd.DataFrame, market: pd.DataFrame, cards: Sequence[pd.Timestamp] | None = None) -> pd.DataFrame

Per fight: p0 (the rule by source), p0_history and ko_share, walked card by card (cards: the dates to price; None: every date from 2006).