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.fit enforces the shape inside the fit, so the fitted coefficients already satisfy it; Constraint.postfit repairs the shape after an unconstrained fit. Each namespace offers the same four members: increasing, decreasing, convex and concave, every one of them a ConstraintSpec.

Examples

>>> from superglm import Constraint, Spline
>>> Spline(kind="ps", k=10, constraint=Constraint.fit.increasing)