Recent Releases of https://github.com/martineastwood/penaltyblog
https://github.com/martineastwood/penaltyblog - v1.5.1
- Restricted
scipyto version<=1.15.3due to breaking changes in theminimizefunction introduced in1.16+, which affect goal model compatibility.
- Python
Published by martineastwood 6 months ago
https://github.com/martineastwood/penaltyblog - v1.5.0
Package Updates
Pitch- Initial release of interactive
Pitchplotting library
- Initial release of interactive
MatchFlowFlownow has it's own query language, with support for boolean expressions and field comparisons via.query
Goals Models- All Goals Model's
.fitfunctions now take an optional dictionary of arguments to pass to scipy's optimiser - All GoalsModels now fit using an optional gradient (defaults to True), which improves the fit time by approx 5-10x
- All Goals Model's
FootballProbabilityGrid- Updated class to include more betting markets
- Now supports fractional Asian handicaps and totals
- Optionally normalizes probabilities to sum to 1 (default: True)
- Calculations now use vectorized numpy operations for improved performance
- Caching of results for repeated queries to improve efficiency
Goal Expectancy- Added support for removing overrounding from input probabilities
- Improved handling of edge cases in probability distributions
- Altered to using probabilities rather than odds
- Added more diagnostic output for debugging
- Optionally normalizes probabilities to sum to 1
Documentation Improvements
- Added Pitch documentation
- Updated Flow documentation with
.queryexamples - Completely rewritten documentation for Goals Models and goal expectancy
- Removed obsolete examples
- Python
Published by martineastwood 6 months ago
https://github.com/martineastwood/penaltyblog - v1.4.1
Package Updates
- Fixed bug in
Flow.cacheexecutor logic
- Python
Published by martineastwood 8 months ago
https://github.com/martineastwood/penaltyblog - v1.4.0
v1.4.0 (2025-06-19)
Package Updates
- Introduced optional
FlowOptimizerfor smart plan rewrites
- New
optimize=Trueflag on all flows (off by default) - Safe, conservative rewrites: pushdown, fusion, and simplification
- Enhanced
.explain(compare=True)for before/after plan introspection - Optimizer is backwards-compatible and fully opt-in
- New
- Added
.plot_plan()onFlowandFlowGroupto visualize pipeline structure .explain()now works onFlowGroup, and supportscompare=True- New
.with_schema({...})method to cast and validate fields
- Example:
Flow.with_schema({"x": int, "ts": parse_datetime})
- Example:
- Added
.rolling_summary()toFlowGroupfor windowed group summaries
(e.g. rolling 5-minute aggregates per player or team) - Added
.time_bucket()toFlowGroupfor time-based binning summaries - Added
.show()method to pretty-print results usingtabulate Flow.collect()now supports optional progress bars during execution
Documentation Improvements
- Refreshed documentation to include:
FlowOptimizerandoptimize=True.with_schema(),.rolling_summary(),.show()- Plan introspection via
.explain(compare=True)and.plot_plan() - Enhanced type hints throughout the package for improved compatibility with
mypy
- Python
Published by martineastwood 8 months ago
https://github.com/martineastwood/penaltyblog - v1.3.0
Package Updates
- Initial release of
MatchFlow
Documentation Improvements
- Added
MatchFlowdocumentation - Added
MatchFlowrecipes documentation - Added API references for all of
penaltyblog - Added stub file for
metricCython code - Added stub file for
modelsCython code
- Python
Published by martineastwood 9 months ago
https://github.com/martineastwood/penaltyblog - v1.2.0
v1.2.0 (2025-04-10)
Package Updates
- Updated Elo Ratings model to be more football-specific so that it now includes home field advantage and can predict draw probabilities
- Added new Cythonised Ignorance Score metric
- Added new Cythonised Multiclass Briar Score metric
- RPS functions now raise a ValueError exception if outcome is out of bounds
Documentation Improvements
- Updated Elo documentation
- Added Pi Ratings documentation
- Added examples for ignorance score
- Added examples for multiclass briar score
- Updated examples for RPS
- Python
Published by martineastwood 11 months ago
https://github.com/martineastwood/penaltyblog - v1.1.0
Performance Enhancements
- Rewrote Dixon-Coles model using Cython, achieving approximately 250x speed improvement.
- Rewrote Poisson model using Cython, achieving approximately 250x speed improvement.
- Implemented Negative Binomial Goals Model in Cython for enhanced performance.
- Added high-performance Cython implementation of the Bivariate Poisson Goals Model based on Karlis & Ntzoufras.
- Introduced Cython implementation of the Bivariate Weibull Count Copula Goals Model based on Boshnakov et al.
- Developed Pi Ratings System based on Constantinou et al.
- Migrated ranked probability score functions to Cython for improved speed.
Package Updates
- Temporarily removed Stan-based models due to dependency management challenges. Investigating improved packaging strategies for future reintegration.
- Temporarily removed Rue and Salvesen model pending revision to accurately reflect its intended methodology (previously implemented as a hybrid Dixon-Coles variant).
Documentation Improvements
- Updated and expanded model examples in the documentation.
- Enhanced type hints throughout the package for improved compatibility with
mypy. - Updated documentation to
pydataSphinx theme.
CI/CD and Testing
- Expanded GitHub Actions workflows to perform unit tests across all supported Python versions.
- Extended GitHub Actions workflows to perform unit tests on Windows, macOS, and Linux.
- Configured GitHub Actions to automatically build wheels for all supported Python versions across Windows, macOS, and Linux.
- Python
Published by martineastwood 11 months ago
https://github.com/martineastwood/penaltyblog - v1.04
Moved Stan model code into separate files as the previous method of loading from a string via a temporary file was causing issues for some users on Windows
- Python
Published by martineastwood about 1 year ago
https://github.com/martineastwood/penaltyblog - v1.04
Moved Stan model code into separate files as the previous method of loading from a string via a temporary file was causing issues for some users on Windows
- Python
Published by martineastwood about 1 year ago
https://github.com/martineastwood/penaltyblog -
- Fixed bug in how the Bayesian models indexed teams in the predict function
- Goals model now only predict individual team names rather than iterables of team names as was causing compatibility issues between different sequence objects.
- Python
Published by martineastwood about 1 year ago
https://github.com/martineastwood/penaltyblog -
- Updated how the Bayesian models handle the Stan files to prevent access denied issues on Windows
- Python
Published by martineastwood about 1 year ago
https://github.com/martineastwood/penaltyblog -
- updated
install_stanfunction to install the C++ toolchain on Windows if required
- Python
Published by martineastwood about 1 year ago
https://github.com/martineastwood/penaltyblog -
- Removed pymc as a dependency
- Updated all other dependency versions
- Added support for Python 3.13
- Rewrote
BayesianHierarchicalGoalModelmodel into Stan instead of pymc and updated prediction method to integrate over the posterior rather than just sampling the mid-point - Rewrote
BayesianRandomInterceptGoalModelinto Stan instead of pymc, updated model to use a more accurate random intercept, and updated prediction method to integrate over the posterior rather than just sampling the mid-point - Rewrote
BayesianBivariateGoalModelinto Stan instead of pymc, improved model so converges better, and updated prediction method to integrate over the posterior rather than just sampling the mid-point - Added
BayesianSkellamGoalModelmodel for predicting outcomes of football (soccer) matches based on the Skellam distribution - Removed obsolete sofifa and espn scrapers
- Optimised
RPScalculation - Optimised
ELOcode - Optimised
Kelly Criterioncode - Updated
FootballProbabilityGridto store its internal matrix as a numpy array - Updated all example notebooks
- Increased unit test coverage
- Added CI/CD
- Removed Poetry from build step
- Updated documentation
- Added type hinting to
Colleyclass - Added type hinting to
Masseyclass
- Python
Published by martineastwood about 1 year ago