betting_combat.rounds.identity.match
Matcher: the one rule for a source that names a bout’s two fighters by name (the
sportsbook lines, Kalshi’s card prices and props, the method odds, Wikipedia’s segments,
MMADecisions’ judges, a live card’s Kalshi and Cito bouts). It replaces the four rules the
2026-10-29 audit found (each fighter sharing a word with a side, the first bout hit taken,
straight tried before crossed: two fighters sharing a word, ‘Brandon Royval’ / ‘Brandon
Moreno’, were always taken in the source’s order; three judge cards were the wrong way round).
window the bouts within ``days`` of the row's date (Wikipedia and Kalshi date some cards a day after UFCStats), or the bouts given (a live card)names each of the row's two names to the window fighters it can be, at the strongest level any of them reaches: 3 the same name (``names.canon_name``) as one of the fighter's spellings 2 one of its spellings written otherwise (``names.variant``) 1 a word of three letters or more in common (``name_tokens``)pair exactly one (bout, order) of the window has the two names' candidates as its two fighters; none or several: no match, with the reasonresult a row stating its winner must name the bout's winner (a row whose result disagrees is not that bout)Orientation is never the source’s order: a match says which of OUR fighters each name is
(fighter_x / fighter_y), and every A/B value is framed from that.
On the history (2026-10-29): sportsbook 6,907 of 6,916 rows matched, 0 results disagreeing but 2 rows whose file has the result wrong; Kalshi 648 of 709 (the rest have no UFCStats bout), 0 disagreeing; the old rule’s 3 mis-oriented judge cards and 2 segment rows on the wrong bout come out right.
Classes
Matcher
The rule of the module doc over bouts (one row per bout: fight_id (our
bout_uid), date, fighter_1, fighter_2, and winner (slot 1 / 2; 0 or
missing: none)), each fighter known by spellings (fighter_uid -> names).
candidates
candidates(name: str, fighters: Iterable[str]) -> tuple[set[str], int]The fighters name can be, of fighters, at the strongest level reached.
frame
frame(rows: pd.DataFrame, x: str, y: str, date: str = 'date', winner: pd.Series | None = None, days: int = 1) -> pd.DataFramepair for every row of rows (columns date, x, y; winner:
per row ‘x’ / ‘y’ / None): one row per input row, row its position, the match
(bout_uid, fighter_x, fighter_y, level) or the miss reason.
pair
pair(date: Any, x: Any, y: Any, winner: str | None = None, days: int = 1, bouts: Sequence[_Bout] | None = None) -> PairMatch | strThe bout x v y is (a PairMatch), else why not (a str).
Args:
winner: the row’s winner, ‘x’ or ‘y’ (None: not stated).
bouts: the window itself (a live card’s bouts, self.window’s form); None:
the bouts within days of date.
window
window(date: Any, days: int = 1) -> list[_Bout]PairMatch
The bout a row is, and which of its fighters each of the row’s names is.