Skip to content

betting_combat.rounds.features.similarity

Similarity: fighters grouped by style, and how styles have fared against each other.

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

style clusters k-means (k = 6) on each fighter’s as-of style vector: strikes landed and absorbed per minute, striking accuracy, takedowns per 15, takedown defence, submission attempts per 15, control share, knockdowns per 15, fitted on fighter-fights with at least 3 earlier fights; every fighter-fight is then assigned to its nearest centre. On our ids (2026-10-30) the fit is as of the year: a bout of year Y reads the styles of the fit on the fighter-fights before 1 January of Y, its pair records counted in those styles (the research fitted once, on 2008-2019, which every bout before 2020 then read: the future’s styles); a year with fewer than MIN_FIT such fighter-fights has none style_edge_a how fighters of A’s style have done against fighters of B’s style in earlier fights: win rate minus 0.5, shrunk toward 0 with 20 pseudo-fights (0 when both share a style, and for A’s first fights) style_finish how often fights between those two styles ended inside the distance, from earlier fights, shrunk toward the league rate with 20 pseudo-fights style_known 1 when both fighters had 2+ earlier UFC fights (a style estimate means something); the tree can discount the rest

A new fighter with a known style gets the record of fighters who fought like him: the cross-sectional learning a raw fighter id cannot give.

Classes

StyleSimilarity

build

build(years: Iterable[int] | None = None) -> pd.DataFrame

Per fight_id: style_1, style_2, style_edge_1 (from slot 1’s side), style_finish, style_known. On our ids: the bouts of years (None: every year), each year’s from its own fit (the module doc).

centres

centres() -> pd.DataFrame

The six styles in the original units, for reading them.

clusters

clusters(before: str = FIT_BEFORE) -> pd.DataFrame | None

Each fighter-fight’s style from the fit on the fighter-fights dated before before; None when too few (as of the year, on our ids).