socceraction.xthreat.scoring_prob#

socceraction.xthreat.scoring_prob(actions, l=16, w=12)#

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

Parameters:
  • actions (pd.DataFrame) – Actions, in SPADL format.

  • l (int) – Amount of grid cells in the x-dimension of the grid.

  • w (int) – Amount of grid cells in the y-dimension of the grid.

Returns:

A matrix, denoting the probability of scoring for each cell.

Return type:

np.ndarray