Machine learning with football
Machine learning glossary
Every term from the chapters, A to Z, with the chapter that explains it.
- Batch size
- How many examples the model looks at before each update of the weights and the bias. A hyperparameter. Chapter 2: Linear regression · Hyperparameters
- Bias (b)
- The model's starting value: what it predicts when every feature is 0. For points per game against goal difference, the points of a team with goal difference 0. Bias in the sense of unfairness is a different thing. Chapter 2: Linear regression
- Binary classification
- Classification with exactly two categories: over 2.5 goals or not, both teams score or not. Chapter 1: Introduction to machine learning
- Classification model
- A supervised model that predicts a category, such as home win, draw or away win. Chapter 1: Introduction to machine learning
- Clustering
- Grouping similar examples without being told the groups, such as teams by playing style. You name the groups afterwards. Chapter 1: Introduction to machine learning
- Convergence
- The point in training where more steps hardly change the loss any more. The loss curve goes flat. Chapter 2: Linear regression · Gradient descent
- Convex
- Shaped like a bowl, with one lowest point. The loss of a linear model is convex, so gradient descent cannot get stuck in a wrong dip. Chapter 2: Linear regression · Gradient descent
- Dataset
- The table of examples a model learns from. Good ones are large (many examples) and diverse (every kind of team, from title winners to relegation sides). Chapter 1: Introduction to machine learning
- Early stopping
- Regularization by stopping training after a fixed number of steps, while the loss is still falling, before the weights grow too large. Chapter 3: Logistic regression · Loss and regularization
- Epoch
- One pass in which the model has seen every example once. 20 teams in batches of 5 make 4 steps per epoch. Chapter 2: Linear regression · Hyperparameters
- Evaluating
- Testing a trained model on labelled examples it did not train on: give it only their features and compare its predictions with the real labels. Chapter 1: Introduction to machine learning
- Example
- One row of data: the features, and in supervised learning the label too. One team in the table is one example. Chapter 1: Introduction to machine learning
- Feature
- An input the model predicts from: goal difference per game, possession, shots. Written x. Chapter 1: Introduction to machine learning
- Full batch
- Every example in each step. Smooth, but slow once a dataset has millions of rows. Chapter 2: Linear regression · Hyperparameters
- Generative AI
- Models that create new content from an input, such as text-to-text or text-to-image: a match report written from the stats. Chapter 1: Introduction to machine learning
- Gradient
- For every parameter, which way and how steeply the loss changes when you move it. Gradient descent steps the other way. Chapter 2: Linear regression · Gradient descent
- Gradient descent
- Training by small steps: work out the gradient, move the weights and the bias a bit against it, repeat until the loss stops falling. Chapter 2: Linear regression · Gradient descent
- Hyperparameter
- A setting you pick before training starts, such as the learning rate. The model never changes it. Chapter 2: Linear regression · Hyperparameters
- Inference
- Using a trained model on new, unlabelled examples, such as predicting the points of a promoted team. Each such prediction is an inference. Chapter 1: Introduction to machine learning
- Iteration
- One update of the weights and the bias, from one batch. Also called a step. Chapter 2: Linear regression · Hyperparameters
- L1 loss
- A loss: add up the size of every miss, without squaring. Divide by the number of examples and you get MAE. Chapter 2: Linear regression · Loss
- L2 loss
- A loss: add up the square of every miss. Divide by the number of examples and you get MSE. Chapter 2: Linear regression · Loss
- L2 regularization
- Adds λ · w² to the loss, so large weights cost extra. Pulls the weights toward 0 and makes the curve gentler. Chapter 3: Logistic regression · Loss and regularization
- Label
- The answer the model should predict: points per game, the final result. Written y. Chapter 1: Introduction to machine learning
- Labelled example
- An example with the label filled in, such as a team with its real points. Training needs these. Chapter 1: Introduction to machine learning
- Learning rate
- How big each gradient descent step is. Too small and training crawls. Too big and the loss jumps around or grows. Chapter 2: Linear regression · Hyperparameters
- Linear regression
- A regression model that is a straight line (or flat plane, with more features): y' = w · x + b. Chapter 2: Linear regression
- Log loss
- The loss for probabilities: the average of −ln of the probability the model gave to what really happened. Saying 99% and being wrong costs 4.6, saying 60% and being wrong 0.9. Chapter 3: Logistic regression · Loss and regularization
- Log-odds
- The natural log of p / (1 − p). A 75% home win chance is odds of 3 to 1, so log-odds of ln 3 ≈ 1.1. In logistic regression it is z, the straight-line part. Chapter 3: Logistic regression · Calculating a probability
- Logistic regression
- A model that predicts the probability of a yes or no outcome, such as a home win: a straight line passed through the sigmoid. Chapter 3: Logistic regression
- Loss
- One number for how wrong the model's predictions are on the examples. Training tries to make it as small as possible. Chapter 2: Linear regression · Loss
- Loss curve
- The loss after every training step, as a line. It falls steeply, then flattens out once the model converges. Chapter 2: Linear regression · Gradient descent
- Mean absolute error (MAE)
- A loss: the average size of the errors, without squaring. One big miss counts less than with MSE. Chapter 2: Linear regression · Loss
- Mean squared error (MSE)
- A loss: square each error, then take the average. Misses above and below do not cancel, and big misses count much more. Chapter 2: Linear regression · Loss
- Mini-batch
- A few random examples, more than one and fewer than all, whose gradients are averaged for one step. The usual choice on big datasets. Chapter 2: Linear regression · Hyperparameters
- Model
- The mathematical relationship a system learns from data and then uses to make predictions. Chapter 1: Introduction to machine learning
- Multiclass classification
- Classification with more than two categories: home win, draw or away win. Chapter 1: Introduction to machine learning
- Outlier
- An example far from the rest, such as a team on a negative goal difference sitting in the top four. MSE lets it pull the line toward it, MAE much less. Chapter 2: Linear regression · Loss
- Overfitting
- A model that matches its training examples so closely that it does badly on new ones, like a model that has memorised last season instead of learning football. Chapter 3: Logistic regression · Loss and regularization
- Parameter
- A number the model learns in training, such as the weight and the bias. Compare hyperparameter. Chapter 2: Linear regression
- Policy
- In reinforcement learning, the strategy the model learns: which action to take in which situation to get the most reward. Chapter 1: Introduction to machine learning
- Prediction
- The model's output for an example: 1.9 points per game, 64% home win. Written y'. Chapter 1: Introduction to machine learning
- Regression model
- A supervised model that predicts a number: goals in a match, points per game. Chapter 1: Introduction to machine learning
- Regularization
- Any way of punishing a model for being too sure or too complex while it trains, so it does not learn the training matches by heart. Chapter 3: Logistic regression · Loss and regularization
- Regularization rate (λ)
- The hyperparameter that sets how hard L2 regularization pulls: 0 switches it off, a big λ flattens the model toward a coin flip. Chapter 3: Logistic regression · Loss and regularization
- Reinforcement learning
- Learning by acting: the model gets rewards and penalties for what it does, like a simulated penalty taker scoring or missing. Chapter 1: Introduction to machine learning
- Reward
- In reinforcement learning, the score an action earns. The model learns to collect as much as it can. Chapter 1: Introduction to machine learning
- Root mean squared error (RMSE)
- The square root of MSE. It is back in the units of the label, so an RMSE of 0.2 means the line is typically about 0.2 points per game off, with big misses weighing extra. Chapter 2: Linear regression · Loss
- Sigmoid function
- σ(z) = 1 / (1 + e^−z). Squeezes any number into a probability between 0 and 1, never quite reaching either. 0 becomes 50%. Chapter 3: Logistic regression · Calculating a probability
- Squared loss
- Another name for L2 loss. Fine for a straight line, a poor fit for probabilities, where it hardly notices the difference between 99% and 99.99%. Chapter 3: Logistic regression · Loss and regularization
- Stochastic gradient descent (SGD)
- Gradient descent with a batch size of 1: one random team per step. Cheap steps, noisy loss curve. Chapter 2: Linear regression · Hyperparameters
- Supervised learning
- Learning from examples that come with the correct answer, the label, such as past games with their final scores. Chapter 1: Introduction to machine learning
- Training
- Finding the model from the examples: adjusting its parameters until the loss is small. Chapter 1: Introduction to machine learning
- Unlabelled example
- An example without the label, such as a season not yet played. The model predicts the label for it. Chapter 1: Introduction to machine learning
- Unsupervised learning
- Learning from data without answers, by finding patterns or groups in it. Chapter 1: Introduction to machine learning
- Weight (w)
- How much a feature counts in the prediction: the slope of the line. A weight of 0.6 means one more goal of difference per game adds 0.6 points per game. Chapter 2: Linear regression