Sign in

Martin Eastwood

@martineastwood.co.uk
2K followers 120 following 62 posts

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

PostsRepliesMedia
Martin Eastwood @martineastwood.co.uk · 09/06/2026
🚀 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
151
Martin Eastwood @martineastwood.co.uk · 27/03/2026
Looking forward to the Field Of Play Conference today. If you’re there as well then come over and say hi 👋
020
Martin Eastwood @martineastwood.co.uk · 28/02/2026
🚀 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.
090
Martin Eastwood @martineastwood.co.uk · 08/01/2026
Bayesian goal models are back in penaltyblog v1.8.0 - and this time, they’re dependency-free! ⚽️📈
A dark-themed code editor window showing Python code using the penaltyblog library. It demonstrates initializing a HierarchicalBayesianGoalModel with home/away goals and teams, fitting the model using MCMC sampling with parameters like 2000 samples and 4 chains, and finally predicting match probabilities for an Arsenal vs. Manchester City fixture
1133
Martin Eastwood @martineastwood.co.uk · 29/12/2025
⚽ 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
010
Martin Eastwood @martineastwood.co.uk · 09/12/2025
⚽ 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.
160
Martin Eastwood @martineastwood.co.uk · 04/12/2025
Have been doing Advent of Code in Nim and Kotlin this year and enjoying learning both. I can see Nim becoming one of my favourite languages!
010
Martin Eastwood @martineastwood.co.uk · 20/10/2025
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...
pena.lt
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...
3235
Martin Eastwood @martineastwood.co.uk · 17/10/2025
🎉 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
043
Martin Eastwood @martineastwood.co.uk · 07/10/2025
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
3144
Martin Eastwood @martineastwood.co.uk · 23/09/2025
⚽ 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
110
Martin Eastwood @martineastwood.co.uk · 18/08/2025
🚀 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...
pena.lt
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...
050
Martin Eastwood @martineastwood.co.uk · 15/08/2025
🚀 penaltyblog v1.5.0 is here! ✅ Interactive pitch plots ✅ 5-10× faster goal models ✅ New Flow query DSL What’s new 👇
142
Martin Eastwood @martineastwood.co.uk · 16/07/2025
📊 New article on my blog: How Accurate Are Soccer Odds? A Data Dive into 250 Million Betting Lines 🔍 How sharp are different bookmakers? 📈 How accurate are bookmaker's odds? 🎯 Are the odds well-calibrated? ➡️ pena.lt/y/2025/07/16...
pena.lt
How Accurate Are Soccer Odds? A Data Dive into 250 Million Betting Lines
A data-driven deep dive into how accurately bookmakers price global soccer markets...
0164
Martin Eastwood @martineastwood.co.uk · 19/06/2025
🚀 penaltyblog v1.4.0 is out! Now includes a query plan optimiser for smarter Flow pipelines: • Optional FlowOptimizer for smart rewrites (optimize=True) • New .plot_plan() for pipeline viz • .with_schema() for field validation • Rolling- and time-based summaries github.com/martineastwo...
github.com
GitHub - martineastwood/penaltyblog: ⚽ High-performance football analytics toolkit: build data pipelines, scrape data, model matches, rank teams, and bet smarter | Powered by pena.lt/y/blog 🚀
⚽ High-performance football analytics toolkit: build data pipelines, scrape data, model matches, rank teams, and bet smarter | Powered by pena.lt/y/blog 🚀 - martineastwood/penaltyblog
140
Martin Eastwood @martineastwood.co.uk · 25/05/2025
🚨 I've updated penaltyblog to v1.3.0 It now ships with matchflow, a new submodule for building streaming data pipelines from nested football JSON (like Statsbomb events). Composable, lazy, and designed for the way football data actually looks. github.com/martineastwo...
github.com
GitHub - martineastwood/penaltyblog: ⚽ High-performance football analytics toolkit: build data pipelines, scrape data, model matches, rank teams, and bet smarter | Powered by pena.lt/y/blog 🚀
⚽ High-performance football analytics toolkit: build data pipelines, scrape data, model matches, rank teams, and bet smarter | Powered by pena.lt/y/blog 🚀 - martineastwood/penaltyblog
130
Martin Eastwood @martineastwood.co.uk · 01/05/2025
New article on my blog: why the Ranked Probability Score might be misleading you when evaluating football prediction models - and what to use instead pena.lt/y/2025/05/01... #FootballAnalytics #DataScience #RPS
pena.lt
Better Metrics for Football Forecasts: Moving Beyond the Ranked Probability Score
Why the Ranked Probability Score might be misleading your football model evaluations, and what to use instead....
160
Martin Eastwood @martineastwood.co.uk · 14/04/2025
New on my blog: Pi Ratings — a football-first alternative to Elo. ✅ Handles draws ✅ Uses score margins ✅ Beats Elo on predictions Includes code, benchmarks & more: 👉 pena.lt/y/2025/04/14...
pena.lt
Pi Ratings: The Smarter Way to Rank Football Teams
A smarter, football-focused alternative to Elo — using Pi Ratings to track team strength and predict matches...
1174
Martin Eastwood @martineastwood.co.uk · 10/04/2025
penaltyblog v1.2.0 is released! ✅ Elo Ratings now football-specific (home advantage + draw probabilities) ⚡️ Fast Cython implementations of Ignorance Score & Multiclass Brier Score 📝 Updated docs / examples for Elo, Pi Ratings, RPS & more github.com/martineastwo...
github.com
GitHub - martineastwood/penaltyblog: ⚽ High-performance football analytics toolkit: scrape data, model matches, rank teams, and bet smarter | Powered by pena.lt/y/blog 🚀
⚽ High-performance football analytics toolkit: scrape data, model matches, rank teams, and bet smarter | Powered by pena.lt/y/blog 🚀 - martineastwood/penaltyblog
0133
Reposted by Martin Eastwood
Nils Mackay @nilsmackay.bsky.social · 01/04/2025
[NEW] First blog in a long time! In which I show a pretty straightforward way to derive teams' attacking and defensive strengths from bookmaker odds. This method is not only easy to implement, but also very accurate compared to results-based models. mackayanalytics.nl/2025/04/01/g...
2347
Martin Eastwood @martineastwood.co.uk · 18/03/2025
Looking forward to the Field Of Play Conference today. If you’re there as well today then come over and say hi 👋
010
Martin Eastwood @martineastwood.co.uk · 16/03/2025
⚽ 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
pena.lt
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...
0257
Martin Eastwood @martineastwood.co.uk · 15/03/2025
penaltyblog v1.1.0 is released! 🔥 250x faster models with Cython 📊 New models: Negative Binomial, Weibull, ZIP & Bivariate 🔢 Pi Ratings System for ranking teams 🔗 Full changelog: penaltyblog.readthedocs.io/en/master/changelog/index.html #Python #SportsAnalytics #MachineLearning
penaltyblog.readthedocs.io
Changelog — penaltyblog documentation
2232
Martin Eastwood @martineastwood.co.uk · 27/02/2025
@pysport.org Looks like you've got the wrong Martin on your website as the contributor for my penaltyblog python package - opensource.pysport.org/project/pena...
opensource.pysport.org
000
Martin Eastwood @martineastwood.co.uk · 08/01/2025
It's been a while but I've written a new article for my blog looking at how to calculate Expected Threat (xT) in football / soccer analytics using linear algebra. pena.lt/y/2025/01/08... #python #DataScience #SoccerAnalytics
pena.lt
Calculating Expected Threat in Python Using Linear Algebra
This article walks through how to calculate expected threat in Python using linear algebra instead of the original convergence method...
96110
Martin Eastwood @martineastwood.co.uk · 12/12/2024
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.com
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
2152
Martin Eastwood @martineastwood.co.uk · 07/12/2024
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.
110