Skip to main content

bl-predictor Python powered

Code quality Coverage status PyPI License: MIT
pytest flake8 CodeQL

Bl-predictor is a simple application for predicting game results for the German 1. Bundesliga.
It features a clean graphical user interface (including DarkMode to spare your eyes), automatic data crawling, a variety of prediction-models to choose from, and a few built-in model evaluation tools.

Usage

Install:

pip install bl-predictor

and start the GUI:

bl-predictor-gui

The left column shows you the next upcoming matches. These are automatically crawled from OpenligaDB when the application starts.

The center column gives you the option to tweak your prediction preferences:

  • choose the seasons used for training the model via the slider
  • select a model to train
  • choose a home and guest team

Your result and additional information about the model used will appear in the righthand column.
To make another prediction just use one of the reset-options on the bottom-left.

demo

You can switch to dark mode or exit the application under "Options" in the top-left corner.

dark mode

Prediction models

PoissonModel

A model that predicts the winning team out of two given teams, based on a poisson regression model.
Caution: The model is sensitive to the order of given teams, because the home_team scores better on average! This model is heavily based on a guideline from David Sheehan.

BettingPoissonModel

A adaptation of the PoissonModel improved for betting.
If no relevant (>10%) difference in the teams winning probabilities is present, "Draw" is returned.

FrequencyModel

A model that uses all results of the last seasons to predict a winner based on the relative frequency of wins.

Model Evaluation

The model evaluation features no graphical user interface.
To access it you will need to go into the package source files to prediction_evaluation.py and call the functions given at the bottom of the file. You can:

  • generate a plot about the accuracy / F1-score of all models with different trainset sizes
  • evaluate a single models performance
    • trainset information
    • performance measures
    • ((Betting-)PoissonModel also returns a team-ranking based on the models coefficients)
  • compare two models
  • get general statistics about a trainset

The results will either be given as printout in the console or as plots.png and will look something like this:

Model-Evaluation

Poisson-Conf-Mat

Model-Compare

Accuracy-over-time

License

bl-predictor is made available under the MIT-License

Metadata

Release files for bl-predictor 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bl-predictor 1.2
File Size Uploaded
bl-predictor-1.2.tar.gz 27.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bl-predictor 1.2
File Interpreter ABI Platform
bl_predictor-1.2-py3-none-any.whl Python 3 none any Details

Total release size: 141.6 kB

Release files / bl-predictor-1.2.tar.gz

Download URL bl-predictor-1.2.tar.gz
Size 27.8 kB
Tags Source
SHA-256 checksum
How to use checksums
885ea471c9ce47cea758d78ffe64c47c656e0e7969f96bc118726ba9ab7e57a8
BLAKE2b-256 checksum
How to use checksums
716a551ddb846288df5b3e8b1917a348d0a51b8a20fb94ba339a17468d8ccd61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5

Release files / bl_predictor-1.2-py3-none-any.whl

Download URL bl_predictor-1.2-py3-none-any.whl
Size 113.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfcbc7b4fa1746f757b73bc07ebb1334990cfa42ccbd96739c8014aad3faad05
BLAKE2b-256 checksum
How to use checksums
11362b86023cba82eb19cec066a57de4039defdd0c49d1773b864ea217d7f71f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files

1.1

1 release file

1.0

2 release files

0.0a5

2 release files

0.0a4

1 release file

0.0a3

2 release files

0.0a2

2 release files

0.0a1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page