xT#

Implements the xT framework.

Model#

socceraction.xthreat.ExpectedThreat

An implementation of the Expected Threat (xT) model.

Utility functions#

socceraction.xthreat.load_model

Create a model from a pre-computed xT value surface.

socceraction.xthreat.get_move_actions

Get all ball-progressing actions.

socceraction.xthreat.get_successful_move_actions

Get all successful ball-progressing actions.

socceraction.xthreat.scoring_prob

Compute the probability of scoring when taking a shot for each cell.

socceraction.xthreat.action_prob

Compute the probability of taking an action in each cell of the grid.

socceraction.xthreat.move_transition_matrix

Compute the move transition matrix from the given actions.