Constraint#
- superglm.Constraint = <superglm.features.constraint._ConstraintNamespace object>#
The shape constraints a feature can carry, reached through
Constraint.Constraint.fitenforces the shape inside the fit,Constraint.postfitrepairs it after an unconstrained fit; each offersincreasing,decreasing,convexandconcave(aConstraintSpec).Constraint.fitalso offersflat,cap(lo, hi)andmax_step(up, down=None); rules join with&intoConstraintRules, and.below,.aboveand.within(a, b)restrict one to a stretch.>>> from superglm import Constraint, Spline >>> Spline(kind="ps", k=10, constraint=Constraint.fit.increasing)