Skip to content

betting_combat.rounds.common

Small pieces every part of strategy 4 (rounds) shares, each defined once.

Ported from the research (ufc/dataset/sources.py, ufc/modeling/joint.py, ufc/modeling/layer2.py, ufc/modeling/flat_bets.py, ufc/modeling/execution.py); the numbers must stay identical, so two log-odds functions exist on purpose: the joint model clips at 1 % / 99 %, layer 2 at 0.5 % / 99.5 %.

Functions

afml_size

afml_size(m: Any) -> np.ndarray

Bet size from a meta probability (AFML 10.1): 2 N(z) - 1 with z = (m - 1/2) / sqrt(m (1 - m)); nothing at or below one half.

division_of

division_of(weight_class: Any) -> tuple[str, bool]

(‘Lightweight’, women) from a UFCStats weight class string; ‘Other’ if none.

fee

fee(p: Any) -> Any

Kalshi’s taker fee per contract as the research priced it: 0.07 p (1 - p), unrounded.

logit_joint

logit_joint(p: Any) -> np.ndarray

Log-odds clipped at 1 % / 99 % (the joint model’s).

logit_layer2

logit_layer2(p: Any) -> np.ndarray

Log-odds clipped at 0.5 % / 99.5 % (layer 2’s).

name_tokens

name_tokens(s: Any) -> frozenset[str]

The name’s words longer than two letters (hyphens split).

norm_name

norm_name(s: Any) -> str

Lower-case ASCII letters and single spaces: ‘Łukasz Brzeski’ -> ‘lukasz brzeski’.