Skip to main content

Women's college basketball — additional Python functions — Models and calculators: wbb_team–win_prob

wbb_team_ratings​

wbb_team_ratings(seasons: 'Union[int, list[int]]', *, return_as_pandas: 'bool' = False) -> 'Union[pl.DataFrame, pd.DataFrame]'

Women's opponent-adjusted team ratings (AdjO/AdjD/AdjEM/AdjTempo).

Delegates to sportsdataverse.mbb.mbb_team_ratings.mbb_team_ratings with league="womens" (WBB loaders + women's fitted constants).

Parameters

ParameterTypeDefaultDescription
seasonsUnion[int, list[int]]A season (e.g. 2024) or list of seasons.
return_as_pandasboolFalseReturn a pandas frame instead of polars.

Returns

One row per (season, team_id) -- see the mbb core for the schema.

col_nametypedescription
seasonInt64Season identifier (4-digit year or 'YYYY-YY' string).
team_idStringUnique team identifier.
adj_oFloat64Adj o.
adj_dFloat64Adj d.
adj_emFloat64Adj em.
adj_tempoFloat64
raw_oFloat64Raw o.
raw_dFloat64Raw d.
gamesInt64Games played.
rankInt64Rank.
adj_em_zFloat64

Example

from sportsdataverse.wbb import wbb_team_ratings
wbb_team_ratings(2024).sort("rank").head()

win_prob_from_margin​

win_prob_from_margin(exp_margin: 'float') -> 'float'

Women's home win probability from an expected margin.

Delegates to sportsdataverse.mbb.mbb_game_predict.win_prob_from_margin with league="womens".

Parameters

ParameterTypeDefaultDescription
exp_marginfloatExpected home-minus-away margin in points.

Returns

Probability the home team wins, in (0, 1).

Example

from sportsdataverse.wbb.wbb_game_predict import win_prob_from_margin
win_prob_from_margin(5.0)