Coder Social home page Coder Social logo

world_cup_2022's Introduction

FIFA World Cup 2022


Modeling and simulation of the 2022 FIFA World Cup

Model Script

  • fit_model.R: Estimates Bayesian bivariate Poisson model. For more details, see Equation (2) of Benz and Lopez, 2021.

Simulations

  • run_sim.R: Run 10,000 simulations of the tournament
  • helpers.R: Helper functions for sims.
  • game_preds.R Save out predictions for indivdual games.

Data

Data (internation_soccer_score.csv) courtesy Kaggle.

Flag figures courtesy of Flaticon.

Pre-Tournament Predictions

sim-results

Previous Tournaments

world_cup_2022's People

Contributors

lbenz730 avatar

Stargazers

Manolis avatar Mohammed Salf Shaeerah avatar  avatar ffdsouza avatar  avatar  avatar  avatar Sam Ivanecky avatar  avatar Saiem Gilani avatar Diango Gavidia avatar  avatar Shilpa Bhandari avatar Stephen Akwaowo avatar  avatar Edd Webster avatar Nathan Eastwood avatar Huang Zeqin avatar Jason Zivkovic avatar Josh Cook avatar Owain  gaunders avatar Anubhav avatar Oluwafemi OYEDELE avatar wang minjie avatar Ryo Nakagawara avatar Lucas Freitas avatar Griffin Shelor avatar Lewis Thornton avatar  avatar

Watchers

 avatar  avatar wang minjie avatar

world_cup_2022's Issues

unaccounted confounders

Good work. But I've seen your previous predictions for Euro 2021 and also seeing the current progress in Qatar 11/2022 I believe that your model is incomplete and there are other confounding factors that you should be accounting for. What those are, I cannot really tell you, it needs exploration.

would it be faster and more stable if using poisson_log_lpmf( ) ?

Great work! Thanks for sharing.

I have a small question, if using poisson_log_lpmf( ) in model, will it be faster and more stable?

 for (g in 1:num_games) {
    lambda1[g] = mu + home_field * ind_home[g] + neutral_field * (1 - ind_home[g]) + alpha[home_team_code[g]] + delta[away_team_code[g]];
    lambda2[g] = mu + neutral_field * (1 - ind_home[g])  + alpha[away_team_code[g]] + delta[home_team_code[g]];
  }

  for (g in 1:num_games) {
   target += poisson_log_lpmf(h_goals[g] | lambda1[g]) * weights[g];
   target += poisson_log_lpmf(a_goals[g] | lambda2[g]) * weights[g];
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.