Predicting footballer market value, part 2: the stacked ensemble

Machine LearningStacked EnsemblesCatBoostFootball AnalyticsPythonMajor Project

Post

Part 2 of the series on my final-year major project. Part 1 covered building the multi-source dataset from Transfermarkt, FBref and EA Sports FC.

The case for stacking

Market value has a brutally skewed distribution: most players are worth under €5M while a handful exceed €100M. Different model families make different mistakes on this kind of target — tree ensembles handle the bulk of the distribution well but can struggle at the extremes, while attribute-driven models capture scouting consensus that performance statistics miss.

Stacking exploits that disagreement. Instead of picking one model, several base learners each produce a prediction, and a meta-learner is trained on those predictions (plus selected raw features) to produce the final estimate.

The hybrid architecture

The final model (Model3 in the repository) is a hybrid stack:

  1. Base learners trained on different feature views of the player — performance-statistics models and attribute-based models, including CatBoost for its strong handling of categorical features like position and league.
  2. Aggregated ensemble signals — the mean, median, min and max of the base predictions become features themselves (pred_mean, pred_median, pred_min, pred_max), letting the meta-learner reason about how much the base models agree.
  3. A meta-learner that combines the ensemble signals with high-value raw features such as EA-derived predictions, age and wage context.

A log transform on the target tames the skew: the models predict log-value and the predictions are exponentiated back, so errors are penalised proportionally rather than absolutely.

Did it work?

On the held-out test set, the hybrid model reached:

MetricValue
0.958
MAE≈ €0.96M
RMSE≈ €2.22M
Within ±20% of true value56.5% of players

An R² of 0.958 with a mean absolute error under €1M — against a target that spans from thousands to over €100M — confirmed that market value is largely predictable from observable data. The gap between MAE and RMSE also tells its own story: a small number of star players carry most of the remaining error.

Next up, part 3: opening the black box with SHAP — what actually drives a player's market value?

← All posts