similarity.similarity_score()

Bill James similarity score between two career-totals dicts.

Usage

similarity.similarity_score(
    player,
    other,
    use_position=True,
)

Both inputs are mappings (dicts or Polars row dicts) with keys for the counting stats listed in _COUNTING_DEDUCTIONS and the rate stats in _RATE_DEDUCTIONS. Optionally a POS key for primary position.

Returns an integer score; 1000 means identical careers.