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')
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 |
winners
|
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
|
weights
|
Collection[float] | None
|
The example weights. |
None
|
win_weight
|
float
|
The win weight. |
1.0
|
tie_weight
|
float
|
The tie weight. |
0.5
|
solver
|
Literal['naive', 'pyo3']
|
The solver. |
'pyo3'
|
Returns:
| Type | Description |
|---|---|
EloResult[T]
|
The Elo result. |
Source code in evalica/__init__.py
620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 | |
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. |
win_weight |
float
|
The win weight. |
tie_weight |
float
|
The tie weight. |
solver |
str
|
The solver. |
Source code in evalica/__init__.py
591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 | |