GaussianLS#
- class superglm.GaussianLS(scale_floor: float = 0.01)#
Bases:
LocationPredictor,ScalePredictorGaussian responses with separate mean and standard-deviation predictors.
Declare
family.location(...)for the conditional mean andfamily.scale(...)for the standard deviation. Location uses an identity link. Scale useslog(scale - scale_floor). Results use the column nameslocationandscalein that order.- Parameters:
- scale_floorfloat, default=0.01
Nonnegative lower bound on the standard deviation, in response units. Fitted scale values stay strictly above this bound.
See also
SuperLSSConstruct and fit a model with these predictors.
- predictor_curvature_directional_derivative(
- y: NDArray,
- eta: NDArray,
- eta_direction: NDArray,
- links: Sequence[Link],
- plan: FamilyLikelihoodPlan,
Differentiate observed predictor curvature along one predictor path.
- cdf(
- y: NDArray,
- theta: NDArray,
P(Y <= y)per row from(location, scale).
- quantile(
- p: NDArray,
- theta: NDArray,
The
p-quantile per row from(location, scale),pinside(0, 1).
- expected_shortfall(
- p: NDArray,
- theta: NDArray,
E[Y | Y > q_p]for the unit-weight Gaussian row law.
- variance(
- theta: NDArray,
Var(Y) = sigma^2per row at unit prior weight.
- variance_prior_weighted(
- theta: NDArray,
- weights: NDArray,
Var(Y) = sigma^2 / wper row: the prior weight scales the variance.
- cdf_prior_weighted(
- y: NDArray,
- theta: NDArray,
- weights: NDArray,
P(Y <= y)per row when a prior weight scales the variance tosigma^2 / w.
- quantile_prior_weighted(
- p: NDArray,
- theta: NDArray,
- weights: NDArray,
The prior-weighted
p-quantile per row,pinside(0, 1).
- expected_shortfall_prior_weighted(
- p: NDArray,
- theta: NDArray,
- weights: NDArray,
E[Y | Y > q_p]when the prior weight scales variance by1 / w.