Predicting Football Games: A Comparison Between LSTM and Random Forest
Predicting the outcome of football games has traditionally been done using domain knowledge and statistical analysis. Given the growing success of AI in predictive tasks, its application to football match outcome prediction warrants further investigation. This thesis examines how one classical machine learning model, Random Forest (RF), and one deep learning model, Long Short-Term Memory (LSTM), perform when predicting the outcome of football games. An experiment tuning one hyperparameter per model to try and find its optimal input and the effect it has on the accuracy of the model was conducted. The hyperparameter for the Random Forest is the number of samples per leaf. For the Long Short-Term Memory model, the learning rate is chosen. The features are engineered from a large dataset of historical football games from various European leagues. To predict the outcome, the models use multiclass classification to label a match outcome as a home team win, a draw, or an away team win. The performance of each model will then be evaluated using common evaluation metrics. The performance of the two models will then be compared with each other. The results showed that the number of samples per leaf and the learning rate do indeed affect the accuracy of the models. The best and worst value of the number of samples per leaf produced a difference of roughly two percentage points. As for the learning rate, the impact was larger with the worst and best-performing value having a difference of almost six percentage points. The best value found for each hyperparameter is 46 samples per leaf and a learning rate of 2.4e-4. As for the models, they performed nearly equally for the task, with the random forest model slightly outperforming the Long Short-Term Memory model. Both models failed to classify any match as a draw, leading to a relatively low accuracy of 54% for the random forest model and 53% for the Long Short-Term Memory model.
Publication Details
- Journal
- KTH Publication Database DiVA (KTH Royal Institute of Technology)
- Published
- 2025-01-01
- Primary Topic
- Sports Analytics and Performance
- Type
- article
- Field-Weighted Citation Impact
- 0.00