Martin Eastwood

@martineastwood.co.uk

Somewhere in the middle of a Venn diagram of machine learning and football / soccer. http://www.pena.lt/y/blog.html

🚀 penaltyblog v1.11.0 is out. This release adds: ⚡ predict_many() for fast batch forecasting 🏟️ Neutral venue support 📈 A bundled pre-trained xT model 🚄 ~4× faster Weibull Copula fitting 🤖 Context7 MCP documentation support

🚀 penaltyblog v1.9.0 is live! 🐍⚽️ New in this version: ✅ create_dixon_coles_grid(): Use lambdas from external ML models. ✅ goal_expectancy_extended(): Infer rho/lambdas from odds. 🛠️ Improved quarter lines (2.25/2.75) logic for totals market. ⚡️ More optimisations to FootballProbabilityGrid

A Python code snippet demonstrating the new 'create_dixon_coles_grid' function in the penaltyblog library. The code shows how to initialize a probability grid using expected goals (lambdas) for the home and away teams, and then calculate home win probabilities, over/under 2.5 goal totals, and Asian Handicaps directly from that grid.

⚽ penaltyblog v1.7.1 is now available: Added params_array and param_indices functions to goal models to make it easier to work with the model's parameters. Thank you to Sebastian Velandia for this contribution! pip install --upgrade penaltyblog

⚽ penaltyblog v1.7.0 is now available: Direct integration with the Opta (Stats Perform) API. You can now stream matches & events lazily without downloading the JSON first. Includes helpers for human-readable filtering (no more memorising IDs). pip install --upgrade penaltyblog

Code example showing how the penaltyblog python package can now integrate directly with the StatsPerform Opta API to download data directly.

New article: "Shrinkage, Uncertainty, and Son Heung-min: Using Bayesian Methods to Identify Finishing Ability" which discusses using a Bayesian hierarchical approach to quantifying player finishing ability, with credible intervals to express uncertainty. pena.lt/y/2025/10/01...

Shrinkage, Uncertainty, and Son Heung-min: Using Bayesian Methods to Identify Finishing Ability

Why most finishing metrics are flawed and how a Bayesian approach gives us a truer picture of a player's finishing ability...

pena.lt

🎉 penaltyblog v1.6.1 is out! ✨ What's new: - Python 3.14 support - scipy 1.16+ compatibility - Better numerical stability for Negative Binomial model - New Colab notebook for implied probabilities example pip install --upgrade penaltyblog

Here's how the Premier League table really looks according to Massey Ratings, which account for strength of schedule. 📈 Arsenal (+1.5) & Man City (+1.3) are clear strongest overall 😬 Man Utd (-0.2) rank in the bottom half 📉 West Ham & Forest (-1.2) are worst teams by far

Massey Ratings for the English Premier League

⚽ penaltyblog v1.6.0 is now available! 📊 MatchFlow updates: - SQL-style joins for nested football data (left, right, outer, inner, anti) - Cloud storage support: read/write directly to AWS S3, Google Cloud Storage, and Azure Blob - Automatic type inference for join keys pip install penaltyblog

🚀 New article on my blog walking through the latest updates to the penaltyblog python package for football (soccer) analytics & betting ✅ New interactive pitch plots ✅ 5-10× faster goal models ✅ New Flow query DSL 👉 pena.lt/y/2025/08/14...

Penaltyblog v1.5.0: Faster Models, Smarter Queries, and a Sharper Edge

v1.5.0 delivers interactive charts, faster models, upgraded football probability grid, and a powerful Flow query language - all designed to make your analysis sharper and quicker...

pena.lt

⚽ New blog post - which football prediction model is the best? Poisson, Weibull, or Negative Binomial — each has its strengths and weaknesses. Learn how to optimise them for accurate match predictions using my penaltyblog Python package. pena.lt/y/2025/03/10... #FootballAnalytics #DataScience

Football Prediction Models: Which Ones Work the Best?

Comparing football goals models — Poisson, Dixon-Coles, and more — to see which predicts best and how to optimize them...

pena.lt

It's been a while, but I've finally released a new version of my penaltyblog python package that replaces PyMC with Stan for the Bayesian models. This should make it much easier to install, and it will now import much faster too. github.com/martineastwo...

GitHub - martineastwood/penaltyblog: Library from http://pena.lt/y/blog for modelling and working with football (soccer) data

Library from http://pena.lt/y/blog for modelling and working with football (soccer) data - martineastwood/penaltyblog

github.com

Been meaning to update my penaltyblog python package for a while now but it depends on PyMC for the Bayesian modelling and I can no longer get PyMC's dependencies to install via pip. Ah well, guess it's time to start learning Stan instead.