socceraction.xthreat.ExpectedThreat.interpolator

ExpectedThreat.interpolator(kind='linear')

Interpolate over the pitch.

This is a wrapper around scipy.interpolate.interp2d().

Parameters:

kind ({'linear', 'cubic', 'quintic'} # noqa: DAR103) – The kind of spline interpolation to use. Default is ‘linear’.

Raises:

ImportError – If scipy is not installed.

Returns:

A function that interpolates xT values over the pitch.

Return type:

callable