Serie A Prediction

Andrea Terlizzi
20/03/2017

Idea

The purpose of this application is to predict the outcome of a football match in the Italian league (Serie A) using a predictive model learned on the current season data

Dataset

I downloaded a CSV file from the site football-data.co.uk with the data of the season.

These are the attributes:

  • Division (Serie A)
  • Date of the Match
  • Home Team & Away Team
  • A serie of stats (Goals, Corners, Cards,…) of the match
  • A serie of odds from different bookmakers

Application - ETL

A new attribute called “result” contains the value of the match (1/X/2).

This is the class attribute to predict.

The predictors are five as shown in the following snippet

  HomeTeam   AwayTeam B365H B365D B365A result
1 Juventus Fiorentina  1.50  4.20   7.0      1
2     Roma    Udinese  1.44  4.50   7.5      1
3 Atalanta      Lazio  3.10  3.25   2.4      2

Application - Modeling

The rpart classifier is used to learn a model

A new match result may be predicted after providing, from the side panel of the UI, the five predictors specified in the previous slide

plot of chunk unnamed-chunk-4

Application - UI

The main panel of the UI shows:

  • Two plots with the last matches of the two teams (green=WIN,yellow=DRAW,red=LOSE)
  • A text with the prediction, evaluated after a server computation

plot of chunk unnamed-chunk-5