Source code for a few simple experiments in predicting results in the English Premier League
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This is the source code that I used to run a set experiments in predicting results for football matches in the English Premier League over the 2016/17 season using simple statistics.


  • Mac or Linux - Tested on a Mac, so Linux will probably be okay but for Windows there's a good chance of something not working.
  • Python 3.6 - I ran things with Python 3.6, so anything newer than that should be fine.
  • Various libs - pip install -r require.txt


./ - demo program for predicting match results using Goal Difference and independently derived Home and Away models.

./ - page scrapes results from the BBC sports website and dumps in a SQLite DB in a format suitable for use by libraries and programs here.

./lib/ - library for interacting with SQLite files that contain the results, e.g. the one generated by

/lib/ - library for working with Features and their models.

/lib/ - library for generating simple statistics from match results.

./tests/algorithm_test_results location under which test output SQLite DB's are generated, one per test case.

tests/fixture - sqlite databases constaining fixture test data for the season.

tests/tests_* - unit tests for corresponding libraries in lib

tests/ - experiments.

How to run and should just work assuming dependencies are present.

The tests need the lib directory to be added before invoking the unit testing framework.

From the project's root directory, something similar to PYTHONPATH=pwd/lib; python -m unittest tests/test*.py should work.


To figure out how to use the libraries have a look at their unit tests, failing that I'm afraid it's time to Use the Source Luke ...

More info

There will be a blog post on this shortly which will be found here.