socceraction.vaep.VAEP.rate

VAEP.rate(game, game_actions, game_states=None)

Compute the VAEP rating for the given game states.

Parameters:
  • game (pd.Series) – The SPADL representation of a single game.

  • game_actions (pd.DataFrame) – The actions performed during game in the SPADL representation.

  • game_states (pd.DataFrame, default=None) – DataFrame with the game state representation of each action. If None, these will be computed on-th-fly.

Raises:

NotFittedError – If the model is not fitted yet.

Returns:

ratings – Returns the VAEP rating for each given action, as well as the offensive and defensive value of each action.

Return type:

pd.DataFrame