0
$\begingroup$

So, I am currently learning machine learning and data analysis. I have created for my self a problem that is:

Who will win a match of soccer

Now, I have narrowed it down as being a Binary Classification problem as I only want to figure out who will be the winner of a match.

For this I have some data containing the following data points:

  • Team One
  • Team Two
  • Duration
  • Goal (Team One)
  • Goal (Team Two)
  • Winner

Now, this is where the trouble begins (for me at least) I am unsure which features to choose for my model and also kind of off as to how to manage the data.

Say that I have two teams playing (Liverpool vs Chelsea) now I do have around 5000 data points for all matches played however only around 82 points where it is Liverpool against Chelsea. Which dataset should I use?

Also sometimes their position in the dataset changes meaning that sometimes Liverpool is Team One and sometimes Chelsea is Team One does this matter or should I process the dataset to always match one team at a certain position?

In general, what is the best way to train my model? Should I use the small dataset containing only the matches between these two teams or should I go for all matches in general?

I am sorry for the beginner question I really hope someone can help me out :)

$\endgroup$

1 Answer 1

1
$\begingroup$

When making decisions about which data to use in a model you have to be aware of several pitfalls. One of them is information leakage i.e. including data that contains information that you shouldn't have at the time of prediction.

Both Duration and Goals are data points that you do not have at the time of prediction (that is before a match) and therefore should not be used in a prediction model.

This leaves us with only one information point: the teams involved. You could still make a ML model but it would only tell you something trivial: which of these teams won more head 2 head games in the past because that is the only information it would use to determine the likely winner (therefore the model would also always predict the same outcome because the input does not change).

This means you need much more data to actually make a model. Modern models for predicting the outcomes of sport events use data such as recent performance of the teams, time (e.g. time of day, weekday, season, etc.), recent performance of all involved players, context (e.g. weather, etc.).

It does not seem like your dataset contains this information so I am afraid you will be unable to create a model.

I would recommend to start with a different problem that has a better dataset available and is easier to crack for a beginner. The IRIS dataset is a wellknown beginner ML problem and teaches you how to model a classification algorithm.

$\endgroup$
5
  • $\begingroup$ Thank you so much for your answer say that i did have the recent performance by the player ie how many goals they scored would that be enough to build a somewhat reliable model? $\endgroup$ Jan 4, 2021 at 19:04
  • $\begingroup$ One stat is seldom enough to encapsulate performance especially if it is a raw stat. E.g. goals scored are meaningless for goalies. That's why the best models have a mix of raw stats at the team level and more advanced stats at the player level (e.g. PER in basketball, WAR in baseball, etc.). For football I would imagine on a team level avg. goals scored and allowed per game, win pct and whether it's a home/away game would be the baseline for a solid model. Nothing that would be really accurate but better than chance. Player performance would improve but is also really hard to model. $\endgroup$
    – Fnguyen
    Jan 4, 2021 at 19:58
  • $\begingroup$ @friguyen i think my question is how would i combine those stats? $\endgroup$ Jan 4, 2021 at 22:13
  • $\begingroup$ The reason i ask is that i actually have more data let me show you my datapoints: For each team i have: their wins, losses (their win rate in percentage in total) Total amount of goals assists and goals against them i have their win percentage as home and away Other than that i have full recap of their previous matches and the recap of all their players But how would i combine all of these into a sensible dataset that can be used? $\endgroup$ Jan 4, 2021 at 23:12
  • $\begingroup$ I think i will create a new question with all of this information focused on how to combine datasets $\endgroup$ Jan 4, 2021 at 23:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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