Elo

evalica.elo(xs, ys, winners, index=None, initial=1000.0, base=10.0, scale=400.0, k=4.0, weights=None, win_weight=1.0, tie_weight=0.5, solver='pyo3', **kwargs)[source]

Compute the Elo scores.

Note

Elo, A.E.: The rating of chessplayers, past and present. Arco Pub, New York (1978).

Parameters:
  • xs (Collection[T_contra]) – The left-hand side elements.

  • ys (Collection[T_contra]) – The right-hand side elements.

  • winners (Collection[Winner]) – The winner elements.

  • index (Index | None) – The index.

  • initial (float) – The initial score of each element.

  • base (float) – The base of the exponent.

  • scale (float) – The scale factor.

  • k (float) – The K-factor.

  • weights (Collection[float] | None) – The example weights.

  • win_weight (float) – The win weight.

  • tie_weight (float) – The tie weight.

  • solver (Literal['naive', 'pyo3']) – The solver.

  • **kwargs (Any) – The additional arguments.

Returns:

The Elo result.

Return type:

EloResult

class evalica.EloResult(scores, index, initial, base, scale, k, win_weight, tie_weight, solver)[source]

The Elo result.

Parameters:
scores

The element scores.

Type:

pandas.Series

index

The index.

Type:

pandas.Index

initial

The initial score of each element.

Type:

float

base

The base of the exponent.

Type:

float

scale

The scale factor.

Type:

float

k

The K-factor.

Type:

float

win_weight

The win weight.

Type:

float

tie_weight

The tie weight.

Type:

float

solver

The solver.

Type:

Literal[‘naive’, ‘pyo3’]