Code Monkey home page Code Monkey logo

prem_league_prediction's Introduction

Overview

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.

Dependencies

  • 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

Contents

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

./get_results_from_bbc.py - 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/ActualResultsLib.py - library for interacting with SQLite files that contain the results, e.g. the one generated by get_results_from_bbc.py

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

/lib/StatsLib.py - 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.py - unit tests for corresponding libraries in lib

tests/test_predictor_algorithms.py - experiments.

How to run

predictOmatic.py and get_results_from_bbc.py 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.

Documentation

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.

https://taskudo.info/blog/

prem_league_prediction's People

Contributors

shufflingb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.