Skip to content

athtareq/PREDICTORv1.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PREDICTORv1.0

Application for predicting football results

This is an application developped using C++ and the framework Qt5

This application uses quite a lot of Qt's features.

Process

Well to put it simply, I use Poisson distribution to predict how many occurences a certain number of goals is bound to happen (i.e scored).

The calculation process is explained quite elaborately in this beautiful article

tl;dr: for a team, we need the average number of goals scored and conceded both home and away. We also need the average of goals scored in the league, also home and away. So if for a match, the lambda parameter, which serves as the average used for Poisson distribution, is calculated by multiplying these averages depending on the home and away team. The averages, which are the stats, are calculated using an Excel spreadsheet and stored in a database.

Anyhow, the predictions are preferrably stored in a matrix like this:

matrix

Now the most highly likely final result is the one with the highest associated probability, in the example above it's 2-0. Simple, right ?

Implementation

The most important thing is the stats, which I calculated using a spreadsheet like this:

matrix

I then linked this (and other leagues done simlarly) to a database, then linked the database to Qt.

The calculations then are pretty easy, once one chooses the league, then the home/away teams, we retrieve the associated stats using the SELECT FROM WHERE command and calculate the poisson estimate for n=0,...,6, storing them in a matrix, and displaying the highest number of predicted goals for each team. Just a bunch of for and if blocks.

Here's the log, that I set to print some results:

Screenshot from 2020-06-27 13-27-24

Interface

Screenshot from 2020-06-27 13-23-31

Screenshot from 2020-06-27 13-25-53

Screenshot from 2020-06-27 13-26-17

About

Application for predicting football results

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published