GeneralizedParetoLSS#

class superglm.GeneralizedParetoLSS(shape_lower: float = 0.0, shape_upper: float = 1.0)#

Bases: ScalePredictor, ShapePredictor

Threshold excesses with generalized Pareto scale and shape predictors.

Choose the threshold before fitting and supply the nonnegative excesses as the response. Declare family.scale(...) and family.shape(...). Scale uses a log link; shape uses a bounded logit link. Results use scale and shape in that order.

Parameters:
shape_lowerfloat, default=0.0

Nonnegative lower bound on the tail-shape parameter xi.

shape_upperfloat, default=1.0

Upper bound on xi. Must exceed shape_lower and be at most one. Fitted shape stays strictly between the two bounds.

Notes

The current shape domain gives every row nonnegative, unbounded support and a finite mean. Negative shapes require response-dependent support and are not supported. predict returns the mean excess, scale / (1 - shape). The threshold is not a fitted parameter.

variance(
theta,
) → NDArray[float64]#

Population variance; infinite when the shape is at least one half.

expected_shortfall(
p,
theta,
) → NDArray[float64]#

E[Y | Y > q_p] for the generalized Pareto excess law.