Machine learning with football · Chapter 4 · Classification

Multi-class classification

Home win, draw or away win: three classes, built from two yes or no questions.

Estimated time: 10 minutes · page 6 of 7

Home, draw or away

Football results come in three classes, so this is multi-class classification. One way to build it is out of yes or no questions you already know how to answer:

  1. Home win, or not? That's chapter 3's model.
  2. For the matches the home side didn't win: away win, or draw? A second logistic regression, trained only on those matches.

Multiplying the answers through gives three chances that add up to 100%. Click any dot on the board to see them for one match. The classifier then picks the most likely of the three, and the 3 × 3 confusion matrix counts how often each pick was right.

Look at the draw row. It's almost always empty. A draw rarely comes out as the single most likely result, even between two even teams, so a model that only names its top pick almost never says draw.

When an example can belong to several classes at once, like "both teams scored" and "over 2.5 goals", it's multi-label classification. Chapter 8, on neural networks, goes further into both.

Check yourself

Why does the model hardly ever predict a draw?
With this method, how many yes or no classifiers do three classes need?
A model tags each match with "both teams scored" and "over 2.5 goals", and a match can get both. What kind of model is that?

Leagues