socceraction.xthreat.load_model¶
- socceraction.xthreat.load_model(path)¶
Create a model from a pre-computed xT value surface.
The value surface should be provided as a JSON file containing a 2D matrix. Karun Singh provides such a grid at the follwing url: https://karun.in/blog/data/open_xt_12x8_v1.json
- Parameters:
path (str) – Any valid string path is acceptable. The string could be a URL. Valid URL schemes include http, ftp, s3, and file.
- Returns:
An xT model that uses the given value surface to value actions.
- Return type: