make_linear_penalty#

make_linear_penalty(intercept: float, slope: float, p: int) ndarray[source][source]#

Create a linear penalty.

The penalty is given by intercept + slope * (1, 2, ..., p), where p is the number of variables/columns in the data being analysed. The penalty is non-decreasing.

Parameters:
interceptfloat

Intercept of the linear penalty.

slopefloat

Slope of the linear penalty.

pint

Number of variables/columns in the data being analysed.

Returns:
np.ndarray

The non-decreasing linear penalty values. The shape is (p,). Element i of the array is the penalty value for i+1 variables being affected by a change or anomaly.