betting_combat.features.outcomes
outcomes — what happened in every fight, round by round and then the whole fight, in time order (Sam 2026-11-12). Two uses: the labels the models predict, and what each fighter’s record is built from (how he does each round, how he wins and loses, how fast, on the cards). Never an input as it stands.
One row per fight per round (round 1..) and one for the whole fight (round 0), both
fighters in every row (fighter_a_ / fighter_b_), keyed by bout_id + round, dated by the
fight’s day. ORDER BY date, bout_order, bout_id, row_order reads it in time order: a day’s
fights as they were fought, each one’s rounds and then its fight row.
The fights: every official one (UFC cards, the Contender Series, Road to UFC: source ufc /
dwcs / rtu) with its rounds, and each fighter’s pro fights outside the UFC from Cito’s careers
(source outside; a fight both fighters list once, the lower id as fighter_a), their rounds
inferred from the fight row (Cito tells the result, the method, the round and the time: the
rounds before the last survived, the last stopped at the time, who took each one from how often
an official fight’s winner took that round in fights that ended the same way, _away_rounds).
Every row (its own round’s, or on the fight row the whole fight’s):
time secs fought (a round’s length from the fight’s format, the end time in the last),
ended (the fight ended inside it), end (full / ko / sub / dq / other), end_time_s
(the time on the clock when it stopped), who finished whom
judges judge_1..3 for each fighter (a round’s score; the fight row the card’s total), the
points, how many judges gave it each fighter and called it even, the 10-8s, who took
it (fighter_a_won: 1, a half, 0; the fight row the result), unanimous, and the
cards so far (each judge’s running total, the points, rounds won, on how many cards
each leads); scored_by: cards (the judges’ round scores), totals (each judge’s
fight total split into rounds), verdict (a decision told only its verdict: each card
the likeliest rounds that give it), stats (nobody’s score told: 10-9 on each card to the
fighter the round’s lines favour), finish (the round he was finished in: the
finisher’s, nothing on the cards), inferred (an outside round: its expected score from
the official rounds of fights that ended the same way), none (no score, no lines)
lines’ the round’s call by its lines alone (RoundModel): the chance a judge gives it
call fighter_a, a 10-8 each way (the fight row: its rounds’ mean); has_lines. The lines
are lines.filled’s (the lost control times filled)
Every row also carries its fight’s (the same on all its rows: the label a round’s state is
judged against): the result each way and the winner, the method (decision unanimous / split /
majority, KO, submission, DQ, overturned, could not continue), the finish (punch / kick / knee /
elbow, choke / joint, standing / ground, the named move), end round, the fight’s seconds, the
scheduled rounds and seconds and the share fought, went the distance, first-round finish, close
(a split or majority, or a card within a point), the margin, points deducted, the comeback (won
after trailing on two cards at a round’s end), title, promotion, major.
The judges (checked 11-12): round cards for 3,208 fights; most other decisions carry each judge’s
total in UFCStats’s details, written loser first (99.5% agree with the round cards where both
exist; a draw’s way is the one the rounds’ lines fit best). A total is split into its rounds by
the likeliest scores (10-9, 10-8, 10-10 either way) given each round’s lines (RoundModel,
fitted on the judged rounds dated before each year; the years before MIN_ROUNDS judged rounds
exist use the first fit).
Classes
OutcomesTable
Bases: FeatureTable
features.outcomes: one row per fight per round and one per fight (round 0).
compute
compute(base: Base) -> pd.DataFrameRoundModel
P(fighter_a takes a round on a judge’s card) from the round’s lines, a less b (X), a
logistic without intercept; and P(a 10-8 | the round’s winner) from the winner’s margin in
it (the logit). Fitted on the judge-rounds dated before each year (fit_for).
fit_for
fit_for(year: int) -> tuple[LogisticRegression, LogisticRegression, float]scores
scores(rows: pd.DataFrame) -> np.ndarrayEach round’s log-probability of each of SCORES (rows: date, X, has_lines); a round
without lines even odds, 10-10 at the league’s rate.
Functions
deductions
deductions(detail: str | None, name_a: str | None, name_b: str | None) -> tuple[int, int]Points deducted from each fighter (‘Point Deducted: Illegal Knee by Lindland’): the name after ‘by’ matched to a word of either fighter’s name.
lengths
lengths(fmt: str | None, n: int) -> list[float]The fight’s n round lengths in seconds from its format (‘3 Rnd (5-5-5)’, ‘1 Rnd + OT
(12-3)’), five minutes each past the told ones; untimed (‘No Time Limit’) NaN.
lines_call
lines_call(model: RoundModel | None, rows: pd.DataFrame) -> pd.DataFrameEach round’s call by its lines (OutcomesTable._lines_call on model’s scores): rows date,
X (a less b), has_lines; out fighter_a_lines_p, fighter_a_lines_10_8, fighter_b_lines_10_8.
live_round_model
live_round_model(base: Base) -> RoundModel | NoneThe round model as the table’s build fits it (the judged fights’ cards, the rounds’ filled lines): what the card run calls a live round with.
round_model
round_model(cards: pd.DataFrame, R: pd.DataFrame) -> RoundModel | NoneThe round model on every judged round with lines: cards the judges’ round scores (bout_id,
round, judge, score_a, score_b), R the rounds with their lines a less b (OutcomesTable._rounds);
None without one. The table’s build and the card run’s lines’ call (live_round_model) both.
shares
shares(R: pd.DataFrame) -> pd.DataFrameThe official rounds’ record of each fight’s eventual winner, by how it ended (kind: a
unanimous / split / majority decision, or a finish), the rounds fought (n) and the round
(k, a finish’s before its last): running sums by day of the share he took (s) and of
the unanimous rounds (u), and the rounds behind them (m).
split_total
split_total(total_a: int, total_b: int, lp: np.ndarray) -> np.ndarray | NoneOne judge’s fight total split into its rounds: the likeliest scores (rows of SCORES,
one per round) that add up to it, lp each round’s log-probability of each; None when no
scores do (or more than five rounds).
split_verdict
split_verdict(sign: int, lp: np.ndarray) -> np.ndarray | NoneOne judge’s card from his verdict only (+1 fighter_a’s, -1 b’s, 0 even): the likeliest round scores whose total gives it.
totals
totals(detail: str | None) -> list[tuple[int, int]]Each judge’s total as UFCStats’s details write it (loser first), in their order.