Coder Social home page Coder Social logo

football-predictions's Introduction

Football Predictions

This model is designed to make football predictions based on historical data using Poisson regression.

Obtaining historical data for training

First, the model needs a historical dataset which includes the following information about each match:

  • Date of the match
  • Home team
  • Away team
  • Home goals
  • Away goals

In this implementation, data from the Spanish first division (Liga de Primera División) will be downloaded.

Model training

The model used is a bivariate Poisson family with the following parameters:

  • Each team's attack.
  • Each team's defence.
  • Home team's "playing at home" effect.
  • Global dependence correction.

The training consist in maximizing the likelihood of the parametric model. This has been implemented in terms of logarithms to make the calculation easier.

Model predictions

Once the model has been trained, it can predict matches that occurred in the past or that will be played in the future.

The predict in the past feature can be used for model validation. In order to avoid overfitting issues and to simulate real world performance, a walk forward analysis method has been implemented.

Future improvements

The idea is to analyze the output of this model in order to understand its strong and weak points. These predictions can be used as an input to a more complex metamodel which further improves the accuracy.

football-predictions's People

Contributors

aczapka 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.