GeneralizedParetoLSS#
- class superglm.GeneralizedParetoLSS(shape_lower: float = 0.0, shape_upper: float = 1.0)#
Bases:
ScalePredictor,ShapePredictorThreshold excesses with generalized Pareto scale and shape predictors.
Choose the threshold before fitting and supply the nonnegative excesses as the response. Declare
family.scale(...)andfamily.shape(...). Scale uses a log link; shape uses a bounded logit link. Results usescaleandshapein 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_lowerand 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.
predictreturns the mean excess,scale / (1 - shape). The threshold is not a fitted parameter.- variance(
- theta,
Population variance; infinite when the shape is at least one half.
- expected_shortfall(
- p,
- theta,
E[Y | Y > q_p]for the generalized Pareto excess law.