🦉🦉   WOOT WOOT!   RAPIDMINER WISDOM 2020 EARLY BIRD REGISTRATION ENDS FRIDAY DEC 13!   REGISTER NOW!   🦉🦉

Predict Sports Outcome

PyNoobPyNoob Member Posts: 14 Contributor I
I am a total newbie in Rapidminer. I was trying in python but the coding bit is a bit intense. I want to predict the outcome "Classification" for the team/s that i can specify. "Home Team" & "Away Team". e.g. Liverpool playing against Burnley, Big win goal scored and FC Shalke playing against Borrussia Dortmund, Draw goal sored.  So far I have got distinct responses in the Simulator tab. I would like to use/test those responses. I would ultimitately like to run machine learning to predict these outputs. How can I cluster my data? Where do I start? Please help.. I am really excited about this!
Attachment: MyDream. (for some reason I am unable to remove attachment)
Tghadially

Comments

  • mschmitzmschmitz Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 2,203  RM Data Scientist
    Hi There,

    there is one very important thought you may need to have before: Even when you are able to do this, you need to know what to do with it. Just because you know who will likely win, you do not what to bet on.
    Let me give you an example:
    Munich won the last german championships and is likely the strongest team. Naturally your algorithm will predict a high likelyhood in a game of Munich vs Schalke last season or so. STILL you may want to bet on Frankfurt, if the odds are better than the chances to win.

    You quickly run into interesting optimization problems.

    Cheers,
    Martin
    - Head of Data Science Services at RapidMiner -
    Dortmund, Germany
    lionelderkrikorsgenzerPyNoobPavithra_Rao
  • PyNoobPyNoob Member Posts: 14 Contributor I
    @mschmitz Absolutely Yes!
    Whats the point of having data and the ability to manipulate it if you cannot have fun right?
    Well its all fun and games until you start doing the bit. (Here, I mean, building the correct model, getting the correct dependencies and the dataset and then getting the results, testing it).
    Then, when it comes to betting, I am not the most interested in the outcome bit. I.e. There can be a big win or a big draw or big loss.
    Just these headers are enough for me to help feed into other algorithoms. They can write an article, Have an animated interaction on the video.. So many possibilities. But, to get there, I feel getting the bit where there are statements involving the 'Classification" Column is important. Thats why I am so invested in getting the model correct.
    Would you be ready to help me?
    I would do all the work. All I need is proper guidance.
    So far I have got it down to this:

    Now I understand the Regression model is Binary and I have incorrectly used it in here, However, How do I make it non-binary in here? What would the correct format for the  input file and the correct parameters for the Auto model/Designed model (non-Auto)?


    Thanks,
    Harshad
  • PyNoobPyNoob Member Posts: 14 Contributor I
    @varunm1, @Telcontar120, @lionelderkrikor, @rfuentealba, @kayman, @SGolbert, @hughesfleming68, @kypexin, @Thomas_Ott, @JEdward, @newmint, @vinod_nageshwar, @b031710452, @carolyap2611, @Jedi88, @Pavithra_Rao, @Niharika Can you all helpful people help me in this project? I am sure it would be worth our time!
  • rfuentealbarfuentealba Moderator, RapidMiner Certified Analyst, Member, University Professor Posts: 442   Unicorn
    Let's see.

    I have done *some* of this before, but football (for American people: "soccer") is the least predictable of team sports.

    Some questions arise from the top of my head:
    • How long was the pre-season each year?
    • Is this the first, second, third... game of the season?
    • What playing strategies are being used? 1-4-2-4, 1-4-3-3, 1-5-3-2
    • What position are the players taking in this strategy?
    • How many players have suffered injuries? What was the recovery time?
    • How many players are newcomers to the team?
    • What are the physical details of the players?
    • Man-to-man ability (passes, skills, saves, receptions, losses, fouls, red cards, yellow cards).
    • How many games have the team played with this coach?
    • Is the playing style wide open and offensive? or closed and defensive? aerial game? tiki-taka like Barcelona?
    Even with that information in mind, nobody could imagine that Universidad de Chile dropped to the "B" division here (pero bueno, es que el equipo no tiene estadio*).

    Tomorrow I need to train someone in RapidMiner. We will sit down to check what can we do with this chart. I promise I'll be back to you with some results, ok?

    All the best,

    Rodrigo.


    (*) Only 4 football teams own their stadiums in Chile, all the others are public and administered by the municipalities. Two of the three biggest teams own their stadiums, and we usually mock the third one for not having it despite multiple failed attempts to build one.
    lionelderkrikorPyNoobPavithra_Rao
  • PyNoobPyNoob Member Posts: 14 Contributor I
    @rfuentealba Yes!. Firstly, THANK YOU!
    Thank you for helping me in my quest.
    Please find the preliminary conditions for the exercise: Breaking it down in Phases
    Phase 1:

    We should be able to predict based on past performance data alone.
    • Event Date "Date Time"
    • Competition "Competition of the event" e.g. Premier League/Champions League/etc "Polynomial"
    • Team Playing at home "Home Team" "Polynomial"
    • Home Team Score "Team Score" "Integer"
    • Team Playing away "Away Team" "Polynomial"
    • Away Team Score "Team Score" "Integer"
    • Score of the event "Score" e.g. 1-0/0-6 "Polynomial"
    • Classification describes the event in a bit of descriptive manner i.e. Big Win, Big Loss, Small Win, Small Loss, Big Draw,, etc. Its defined in the 'Classification No Dupes' Sheet "Classification" "Polynomial"
    I want to predict this data for now. (For an event, for the home team vs the away team, the result is expected to be as "Classification".)

    Phase 2: We can add these datapoints for every event and make the algorithim better.

    • How long was the pre-season each year?
    • Is this the first, second, third... game of the season?
    • What playing strategies are being used? 1-4-2-4, 1-4-3-3, 1-5-3-2
    • What position are the players taking in this strategy?
    • How many players have suffered injuries? What was the recovery time?
    • How many players are newcomers to the team?
    • What are the physical details of the players?
    • Man-to-man ability (passes, skills, saves, receptions, losses, fouls, red cards, yellow cards).
    • How many games have the team played with this coach?
    • Is the playing style wide open and offensive? or closed and defensive? aerial game? tiki-taka like Barcelona?
    I am really excited to do this. Thank you again for helping me in this project.I am excited to learn a truckload and also have the knowledge resource along the way!
    fyi. I am pretty comfortable with Alteryx so the learning curve should not be so steep with RapidMiner. 

    Thank You!
    Harshad Barge
    lionelderkrikorPavithra_Rao
  • PyNoobPyNoob Member Posts: 14 Contributor I
    What is the best model or classifier for this task? Logistic regression, I have to select the teams and the score to get an outcome. I want to just select the teams and there would be an output.. possible outputs Home score, Away Score, Score(concatenated home and away Score). I have a descriptive classifier for every score. If the model pick it up.. clusters it and that would be the response, that would be the 🍒 cherry on the cake.. haha.
    I am ready to put in the work.. need worthy team.. 
    [email protected]
  • mschmitzmschmitz Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 2,203  RM Data Scientist
    Hi @PyNoob ,
    as much as I, as a German, would love to do Bundesliga Analysis, i need to pass. I simply don't have the bandwith. I am sorry.

    My go-to algorithm would be as usual GBTs. They are super strong on Tabular data. You need to do very careful analysis to beat them with Neural Networks, SVMs or other.

    Cheers,
    Martin
    - Head of Data Science Services at RapidMiner -
    Dortmund, Germany
    PyNooblionelderkrikor
  • varunm1varunm1 Moderator, Member Posts: 970   Unicorn
    Hello @PyNoob

    Some pointers from my work on a sport analytics project.

    1. Lots of literature need to be done on event statistics that need to be used in the model building. 
    2. You don't need to consider all, but you need to focus on features that are important from the soccer perspective.
    3. Adopt some feature selection techniques and see if the features you are trying to use are useful in model building or not.
    4. Start with simple models like Decision Tree and GLM.
    5. Try to build different models for different leagues and see how it goes.
    6. Validate your model well. This is not just machine learning validation, but domain validation which is very important. If your model is predicting based on an attribute that has statistical relevance but not domain relevance it is not a good generalizable model even though it is highly accurate.

    Just my 2c
    lionelderkrikorPyNoob
Sign In or Register to comment.