Skip to main content

A simple application for predicting game results for the German Bundesliga

Project description

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

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

bl-predictor-1.2.tar.gz (27.8 kB view hashes)

Uploaded Source

Built Distribution

bl_predictor-1.2-py3-none-any.whl (113.9 kB view hashes)

Uploaded Python 3

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