Elo
evalica.elo(xs, ys, ws, index=None, initial=1000.0, base=10.0, scale=400.0, k=4.0, solver='pyo3')
Compute the Elo scores.
Quote
Elo, A.E.: The rating of chessplayers, past and present. Arco Pub, New York (1978).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xs
|
Collection[T]
|
The left-hand side elements. |
required |
ys
|
Collection[T]
|
The right-hand side elements. |
required |
ws
|
Collection[Winner]
|
The winner elements. |
required |
index
|
dict[T, int] | None
|
The index. |
None
|
initial
|
float
|
The initial score of each element. |
1000.0
|
base
|
float
|
The base of the exponent. |
10.0
|
scale
|
float
|
The scale factor. |
400.0
|
k
|
float
|
The K-factor. |
4.0
|
solver
|
Literal['naive', 'pyo3']
|
The solver. |
'pyo3'
|
Returns:
| Type | Description |
|---|---|
EloResult[T]
|
The Elo result. |
Source code in evalica/__init__.py
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 | |
evalica.EloResult
dataclass
Bases: Generic[T]
The Elo result.
Attributes:
| Name | Type | Description |
|---|---|---|
scores |
Series[float]
|
The element scores. |
index |
dict[T, int]
|
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. |
solver |
str
|
The solver. |
Source code in evalica/__init__.py
479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 | |