socceraction.vaep.formula#

Implements the formula of the VAEP framework.

socceraction.vaep.formula.defensive_value(actions, scores, concedes)#

Compute the defensive value of each action.

VAEP defines the defensive value of an action as the change in conceding probability.

\[\Delta P_{concede}(a_{i}, t) = P^{k}_{concede}(S_i, t) - P^{k}_{concede}(S_{i-1}, t)\]

where \(P_{concede}(S_i, t)\) is the probability that team \(t\) which possesses the ball in state \(S_i\) will concede in the next 10 actions.

Parameters:
  • actions (pd.DataFrame) – SPADL action.

  • scores (pd.Series) – The probability of scoring from each corresponding game state.

  • concedes (pd.Series) – The probability of conceding from each corresponding game state.

Returns:

The defensive value of each action.

Return type:

pd.Series

socceraction.vaep.formula.offensive_value(actions, scores, concedes)#

Compute the offensive value of each action.

VAEP defines the offensive value of an action as the change in scoring probability before and after the action.

\[\Delta P_{score}(a_{i}, t) = P^{k}_{score}(S_i, t) - P^{k}_{score}(S_{i-1}, t)\]

where \(P_{score}(S_i, t)\) is the probability that team \(t\) which possesses the ball in state \(S_i\) will score in the next 10 actions.

Parameters:
  • actions (pd.DataFrame) – SPADL action.

  • scores (pd.Series) – The probability of scoring from each corresponding game state.

  • concedes (pd.Series) – The probability of conceding from each corresponding game state.

Returns:

The offensive value of each action.

Return type:

pd.Series

socceraction.vaep.formula.value(actions, Pscores, Pconcedes)#

Compute the offensive, defensive and VAEP value of each action.

The total VAEP value of an action is the difference between that action’s offensive value and defensive value.

\[V_{VAEP}(a_i) = \Delta P_{score}(a_{i}, t) - \Delta P_{concede}(a_{i}, t)\]
Parameters:
  • actions (pd.DataFrame) – SPADL action.

  • Pscores (pd.Series) – The probability of scoring from each corresponding game state.

  • Pconcedes (pd.Series) – The probability of conceding from each corresponding game state.

Returns:

The ‘offensive_value’, ‘defensive_value’ and ‘vaep_value’ of each action.

Return type:

pd.DataFrame

See also

offensive_value()

The offensive value

defensive_value()

The defensive value