Skip to content

betting_combat.rounds.features.round_stats

Group 3 (Dataset 2 only): what happened in the rounds already fought.

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

For the row at the start of round r+1 (r rounds completed, r = 0 .. ):

cum_d_ A - B, summed over rounds 1..r (all stats) cum_s_ A + B, summed over rounds 1..r (finish-related stats) last_d_ A - B in round r alone (the round that just ended) rounds_won_d rounds A won minus rounds B won so far, by a fixed rule on the round’s stats: knockdowns first, then significant strikes landed, then control. (A judges’ view is not known live; this rule is.)

At r = 0 every Group 3 value is 0: nothing has happened yet.

Classes

RoundStats

build

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

rows: fight_id, round_idx (rounds completed). Returns Group 3 aligned to rows.

per_round_ab

per_round_ab(a_slot: pd.Series) -> pd.DataFrame

fight_id, round, and A - B / A + B per stat for that round alone.

Functions

round_winner_rule

round_winner_rule(kd_d: pd.Series, sig_d: pd.Series, ctrl_d: pd.Series) -> Any

+1 A took the round, -1 B, 0 level: knockdowns, then sig. strikes, then control.