I am working on a project to predict football matches using bookmakers' odds. The 6 columns I have are Home Team, Away Team, Home Win Odds, Draw Odds, Away Win Odds, Outcome.

The possible football match outcomes are Away Team Win (A), Draw (D) and Home Team Win (H). I have been using label encoders to represent the variables (0, 1, 2 respectively) but it occurred to me that the outcomes may not be ordinal (since there is no order/rank/preferences to it).


  1. In this case, should I continue with label encoders or should I use one hot encoding? Or it depends on the model used (like Tree based or linear etc)?
  2. If I should change to one hot encoding, how should I ensure that my prediction vector outputs two 0s and one 1 (since it has to be either A, D or H) because sometimes it gave me a vector of three 0s?
  3. I have used one hot encoding for the football teams (20 teams each for both Home and Away). Since a team must play against a unique team, there exists one 1 and nineteen 0s in the first 20 columns and one 1 and nineteen 0s in the next 20 columns. Does this relationship/restriction across the columns affect the models in any way?
  4. Should I apply dimensionality reduction techniques like PCA to it since I now have 20+20+3=43 features as compared to the 5 features previously? I have read that if a tree model is built, the 3 numeric features (bookies' odds) will be rarely used. Or can I just increase the max_features for RandomForestClassifier?

Thanks in advance!

  1. I would expect some ordering, since the expected outcome is probably depending on the team's strengths. However, there may also be a tendency to/away from draws if teams are equally strong. I would guess that the one-hot encoding is the better choice if you have sufficient data to train your model.
  2. Your prediction vector would typically give e.g. [0.1 0.7 0.2] as probabilities, and you select the highest probability as the outcome. Either by hand or in a (final) layer in the model.
  3. It shouldn't. Typical models are dimension agnostic. E.g. a fully connected first layer loses all positional/dimensional bias. For trees similar arguments hold, however, I don't know how well tree models would perform on such sparse data.
  4. The bookies' odds should highly correlate to the expected outcomes, e.g. bookies will likely have odds that reflect relative strength. In such a case, the odds could more or less 'vanish' in the model. With such sparse data, you should definitely tune your parameters for forest models carefully.

Just some added notes: If you want to improve on your model, you could also include a few calculated parameters, e.g. current rank, win/draw ratio for both teams (in general, or just the respective home/away versions), most recent (home/away) results. Or even travel distance if you have the data.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.