Skip to content

betting_combat.rounds.features.targets

Targets for every (fight, round-start) row, and the rows themselves.

Port of the research ufc/dataset/targets.py; the numbers must stay identical.

A fight gets one row per round that started: finishes in round k -> rows for round starts 1..k (round_idx 0..k-1); decisions -> one per scheduled round. A stoppage at 5:00 (corner / doctor between rounds) counts as a finish in that round: no later row.

y_win_fight 1 if A wins the fight y_finish_round 1 if the fight ends by KO/TKO or submission in the round about to start (in the final round: finished in it = 1, went to the judges = 0) y_method ‘ko’ | ‘sub’ | ‘dec’ (how the fight ends, from here) y_decision 1 if the fight goes to the judges y_win_round_j 1/0 A won the upcoming round by the judges’ majority (decisions only) y_win_round_p 1/0 A won the upcoming round: the finisher wins a finishing round; a full round goes to the stats rule (round_stats.round_winner_rule); level -> NaN

Classes

Targets

build

build(rows: pd.DataFrame, fights: pd.DataFrame, rounds: RoundStats, a_slot: pd.Series) -> pd.DataFrame

rows

rows(fights: pd.DataFrame) -> pd.DataFrame

fights: fight_id, kind, finish_round, sched_rounds -> one row per round start.