Constraint#
- superglm.Constraint = <superglm.features.constraint._ConstraintNamespace object>#
The shape constraints a feature can carry, reached through
Constraint.Two namespaces say when a constraint is imposed.
Constraint.fitenforces the shape inside the fit, so the fitted coefficients already satisfy it;Constraint.postfitrepairs the shape after an unconstrained fit. Each namespace offers the same four members:increasing,decreasing,convexandconcave, every one of them aConstraintSpec.Examples
>>> from superglm import Constraint, Spline >>> Spline(kind="ps", k=10, constraint=Constraint.fit.increasing)