Skip to main content

Python bindings for Elo-MRR

Project description

Elo-MMR-Py

Python bindings for Elo-MRR.

Installation

You can install using pip. This is the easiest way to install the package and its dependencies.

Install from PyPI

To install the latest released version from PyPI, run the following command:

pip install Elo-MMR-Py

This will download and install the latest version of Elo-MMR-Py from PyPI.

Install from Source

To install Elo-MMR-Py directly from the source code using Git, run:

pip install git+https://github.com/aropan/Elo-MMR-Py.git

Usage

After installation, you can import and use Elo-MMR-Py in your Python projects:

from elo_mmr_py import Contest, rate

contests = [
    Contest(standings=[('player_1', 0, 0), ('player_2', 1, 1), ('player_3', 2, 2)]),
    Contest(standings=[('player_1', 0, 1), ('player_2', 0, 1), ('player_3', 2, 2)]),
    Contest(standings=[('player_1', 0, 0), ('player_2', 1, 2), ('player_3', 1, 2)]),
    Contest(standings=[('player_4', 0, 0), ('player_1', 1, 1), ('player_2', 2, 2), ('player_3', 3, 3)]),
    Contest(standings=[('player_4', 0, 0), ('player_1', 1, 1), ('player_2', 2, 2), ('player_3', 3, 3)]),
]
rate(contests)

Output for example above:

{'player_1': Player(name='player_1',
                    rating=1675,
                    events=[PyPlayerEvent(contest_index=0, rating_mu=1705, rating_sig=171, perf_score=1744, place=0),
                            PyPlayerEvent(contest_index=1, rating_mu=1663, rating_sig=130, perf_score=1618, place=0),
                            PyPlayerEvent(contest_index=2, rating_mu=1686, rating_sig=111, perf_score=1728, place=0),
                            PyPlayerEvent(contest_index=3, rating_mu=1678, rating_sig=100, perf_score=1660, place=1),
                            PyPlayerEvent(contest_index=4, rating_mu=1675, rating_sig=94, perf_score=1666, place=1)]),
 'player_2': Player(name='player_2',
                    rating=1483,
                    events=[PyPlayerEvent(contest_index=0, rating_mu=1500, rating_sig=171, perf_score=1500, place=1),
                            PyPlayerEvent(contest_index=1, rating_mu=1555, rating_sig=130, perf_score=1618, place=0),
                            PyPlayerEvent(contest_index=2, rating_mu=1500, rating_sig=111, perf_score=1393, place=1),
                            PyPlayerEvent(contest_index=3, rating_mu=1487, rating_sig=100, perf_score=1459, place=2),
                            PyPlayerEvent(contest_index=4, rating_mu=1483, rating_sig=94, perf_score=1471, place=2)]),
 'player_3': Player(name='player_3',
                    rating=1279,
                    events=[PyPlayerEvent(contest_index=0, rating_mu=1295, rating_sig=171, perf_score=1256, place=2),
                            PyPlayerEvent(contest_index=1, rating_mu=1270, rating_sig=130, perf_score=1242, place=2),
                            PyPlayerEvent(contest_index=2, rating_mu=1312, rating_sig=111, perf_score=1393, place=1),
                            PyPlayerEvent(contest_index=3, rating_mu=1291, rating_sig=100, perf_score=1240, place=3),
                            PyPlayerEvent(contest_index=4, rating_mu=1279, rating_sig=94, perf_score=1247, place=3)]),
 'player_4': Player(name='player_4',
                    rating=1809,
                    events=[PyPlayerEvent(contest_index=3, rating_mu=1767, rating_sig=171, perf_score=1819, place=0),
                            PyPlayerEvent(contest_index=4, rating_mu=1809, rating_sig=130, perf_score=1855, place=0)])}

Contributing

Welcome contributions! If you would like to contribute to the project, please fork the repository and submit a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Elo-MMR-Py-1.0.3.tar.gz (7.2 kB view hashes)

Uploaded Source

Built Distributions

Elo_MMR_Py-1.0.3-cp312-cp312-win_amd64.whl (332.3 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

Elo_MMR_Py-1.0.3-cp312-cp312-win32.whl (316.7 kB view hashes)

Uploaded CPython 3.12 Windows x86

Elo_MMR_Py-1.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

Elo_MMR_Py-1.0.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (3.2 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ i686

Elo_MMR_Py-1.0.3-cp312-cp312-macosx_11_0_arm64.whl (458.2 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

Elo_MMR_Py-1.0.3-cp312-cp312-macosx_10_9_x86_64.whl (466.8 kB view hashes)

Uploaded CPython 3.12 macOS 10.9+ x86-64

Elo_MMR_Py-1.0.3-cp311-cp311-win_amd64.whl (332.3 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

Elo_MMR_Py-1.0.3-cp311-cp311-win32.whl (316.6 kB view hashes)

Uploaded CPython 3.11 Windows x86

Elo_MMR_Py-1.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

Elo_MMR_Py-1.0.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (3.2 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ i686

Elo_MMR_Py-1.0.3-cp311-cp311-macosx_11_0_arm64.whl (458.1 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

Elo_MMR_Py-1.0.3-cp311-cp311-macosx_10_9_x86_64.whl (466.9 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

Elo_MMR_Py-1.0.3-cp310-cp310-win_amd64.whl (332.3 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

Elo_MMR_Py-1.0.3-cp310-cp310-win32.whl (316.6 kB view hashes)

Uploaded CPython 3.10 Windows x86

Elo_MMR_Py-1.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

Elo_MMR_Py-1.0.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (3.2 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ i686

Elo_MMR_Py-1.0.3-cp310-cp310-macosx_11_0_arm64.whl (458.1 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

Elo_MMR_Py-1.0.3-cp310-cp310-macosx_10_9_x86_64.whl (466.9 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

Elo_MMR_Py-1.0.3-cp39-cp39-win_amd64.whl (332.3 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

Elo_MMR_Py-1.0.3-cp39-cp39-win32.whl (316.7 kB view hashes)

Uploaded CPython 3.9 Windows x86

Elo_MMR_Py-1.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

Elo_MMR_Py-1.0.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (3.2 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686

Elo_MMR_Py-1.0.3-cp39-cp39-macosx_11_0_arm64.whl (458.3 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

Elo_MMR_Py-1.0.3-cp39-cp39-macosx_10_9_x86_64.whl (467.0 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page