socceraction.xthreat.action_prob

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

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

The options are: shooting or moving.

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.

Return type:

tuple[ndarray[Any, dtype[float64]], ndarray[Any, dtype[float64]]]

Returns:

  • shotmatrix (np.ndarray) – For each cell the probability of choosing to shoot.

  • movematrix (np.ndarray) – For each cell the probability of choosing to move.