When a rich club in Germany goes through a bad performance phase or loses an important match, we like to use the phrase “Geld schießt eben keine Tore”. What means more or less, that big money doesn’t ensure goals. But the overall acceptance is of course, that richer clubs are expected to win more often as they got the money to buy the best players. This inspired me to start a data journey about market values in the big 5 European leagues: What do the market values tell about the development in the different leagues? How do teams perform in relation to the money they spent? Does the market value of a team has a predictive significance?
This time, after over 20 matchdays in the German Bundesliga, I don’t want to take a look at the predicted results. I used my Team Strength MLP now for about 6 months. During this time I analysed the predictions and tried to learn some more stuff about deep learning. So let’s summarize some lessons I have already learned and what could be improved for my model for the next season.
The hardest part of sports analytics is getting data! Not for nothing there are companies, which earn their money just with sports data. But if you are not able or do not want to pay such amounts of money, you got just one possibility: scraping the data from the Web. In an older post, I described a R web scraper. As this one was no longer working, I needed a new one. What brings us to this post. This time I will describe, how to create a web scrapper for static HTML sites with Python and how you are able to implement such a web scrapper as a User Defined Function (UDF) in Exasol.
There is one big reason, why I have chosen Exasol as a database for my football analytics and predictions: Exasol is capable of executing Python and R code inside the database. Your are able to put your statistical calculations and predictive models to your data. The feature User Defined Functions (UDFs) provides the possibility to implement every logic which you normally code in Python or R. This is a really efficient way to extent plain SQL with some predictive functionality like the execution of TensorFlow models.
In this blog post I will explain, how you extend the Exasol community edition with all needed Python3 packages to execute Tensorflow models. Additionally with the latest update I also added the packages and description needed for all my web scrapping scripts.
The 2018/19 season in the Premier League started entirely normal. After a record-breaking season Manchester City was of course favoured to win again the title with Liverpool just having an option as the runner-up. But things changed in December and, according to both coaches, we can expect the match between “the best team in the world” and “the best team in the world”.
So which match could be more usefull to take a look at the MACD analysis for both teams and get a better feeling how this type of analysis can be used to identify the performance trend of a team.
With beginning of the new season in the Bundesliga I started to use my new predictive model “Team Strength MLP“. This model is no longer a statistical model like the Poisson model from last season. It is trained neural network. After the first 10 matchdays it is time to check the current result of my betting history.
I regular listen the Business of Betting Podcast, when driving to work. There I stumbled over a episode, where a experiment with a 60/40 coin was discussed. People were provided a modified coin, which shows head with a probability of 60%. Knowing this fact they should choose a stake, which they think maximizes their profit, and flip the coin 100 times. The result of this experiment was really surprising: Despite a positive edge many people gone busted. But why did this happen?
Part one defined the basic architecture of the Team Strength MLP (multi layer perceptron). The training process and its monitoring via Tensorboard was explained in part two. Now it is time to take a look at the prediction of football matches. Primarily this consists of following steps:
- Load the prediction data set
- Re-build neural network architecture and load pre-trained weights
- Execute prediction
The Bundesliga season 2017/18 will be the test case for this example. The season 2008 – 2016 were used to train the mode.
The first part of this series covered the definition of the network architecture for my Team Strength MLP. This neural network must now be trained. To explain and visualize the training process, Tensorflow offers the web frontend TensorBoard. This post will explain, how you use TensorBoard and what are some basic indicators for a well-trained model.
It is time to build and test my first predictive model with Tensorflow! As I am currently totally unexperienced in creating and optimizing neural networks, I will start with a very simple one, which just uses the predictive variables of the Poisson model. By doing this, I will be able to compare the resulting network with the Poisson model. I am excited to see, whether Tensorflow is able to outperform this statistical model with such a low number of predictive variables. In this series I will provide some basic information, how you are able to build a simple multilayer perceptron (MLP) with Tensorflow, supervise the training process with Tensorboard and use the trained neural network to predict the outcomes of the matches.