Elote 1.0.0 Release: Rating Systems Made Simple
After what feels like forever (and honestly, it kind of has been), I’m thrilled to announce that Elote 1.0.0 has been released.
For those who haven’t been following along, Elote is my little Python library for implementing and comparing rating systems like the Elo system used in chess.
I like these types of library where we take one concept and implement multiple options with the same API. Scikit-learn was obviously a formative influence in my own development here, and at their core category-encoders, keeks, and elote are trying to provide a similarly nice developer experience for different concepts.
What the heck is Elote anyway?
Elote is a Python package that makes it dead simple to implement rating systems for ranking… well, pretty much anything that can compete:
- Chess players or sports teams
- Products in A/B testing
- Features in your product backlog
- Movie recommendations
- The best wings in Atlanta
If you’ve ever needed to rank things based on head-to-head comparisons, Elote has your back.
What’s in the box?
Elote comes packed with several rating systems:
- Elo - The classic chess rating system that started it all
- Glicko-1 & Glicko-2 - Improvements on Elo that track rating reliability and volatility
- TrueSkill - Microsoft’s Bayesian skill rating system for Xbox Live
- ECF - The English Chess Federation rating system
- DWZ - The Deutsche Wertungszahl (German evaluation number) system
- Colley Matrix - The Colley Matrix rating system
- Ensemble - An ensemble class that lets you combine any of the above arbitrarily
How do you use it?
Getting started with Elote is by design ridiculously simple. Here’s a quick example:
from elote import EloCompetitor
# Create two competitors
player1 = EloCompetitor(initial_rating=1500)
player2 = EloCompetitor(initial_rating=1600)
# Check win probability
print(f"Player 2 win probability: {player2.expected_score(player1):.2%}")
# Record a match result (upset!)
player1.beat(player2)
# Ratings are automatically updated
print(f"Player 1 new rating: {player1.rating}")
print(f"Player 2 new rating: {player2.rating}")
But what if you have a ton of matchups to process? That’s where Arenas come in:
from elote import LambdaArena
import random
# Define a comparison function (returns True if a beats b)
def comparison(a, b):
return a > b
# Generate some random matchups between numbers
matchups = [(random.randint(1, 10), random.randint(1, 10)) for _ in range(1000)]
# Create arena and run tournament
arena = LambdaArena(comparison)
arena.tournament(matchups)
# Display final rankings
print(arena.leaderboard())
This example is basically implementing a sorting algorithm using a rating system - not the most efficient approach, but it shows how Elote can work with literally any objects that can be compared.
What’s new in 1.0.0?
The jump to 1.0.0 represents a major milestone for Elote. Here’s what’s changed since the last release:
- Added TrueSkill, Colley, and Glicko-2 rating systems
- Improved and standardized serialization for all competitor classes
- Speed improvements for large numbers of comparisons
- Fixed minimum rating enforcement across all competitor types
- Added benchmarking tools to compare different rating systems
- Added visualization module for plotting
- Added a datasets module to get suitable datasets for testing and comparing rating systems
- Added optimization tools to find optimal thresholds
- Tons of bug fixes and documentation improvements
The full changelog is available on GitHub.
Installation
Getting Elote is as simple as:
pip install elote
or if you want the datasets module:
pip install elote[datasets]
If you’re feeling fancy and want the latest development version:
pip install git+https://github.com/wdm0006/elote.git
Where to find more
- GitHub: https://github.com/wdm0006/elote
- Documentation: https://wdm0006.github.io/elote/html/index.html
Previous posts about Elote
If you’re interested in the journey so far:
- Elote: a python package of rating systems - My original introduction to the library
- Using Cursor for Open Source Library Maintenance - How I’ve been using Cursor to help maintain Elote
- Year’s End: Looking Back at 2017 - Some reflections that include Elote’s early development
Get involved!
Contributions and feedback are always welcome! Whether you want to report a bug, request a feature, or submit a pull request, head over to the GitHub repository and get involved.
I’m particularly interested in hearing about how people are using Elote in the wild. If you’ve built something cool with it, drop me a line!
Thanks for sticking with Elote all this time. Here’s to the next version being released before 2030! 🍻