ConstraintSpec#
- class superglm.ConstraintSpec(
- mode: Literal['fit', 'postfit'],
- kind: Literal['increasing', 'decreasing', 'convex', 'concave', 'flat', 'cap', 'max_step'],
- lo: float | str | None = None,
- hi: float | str | None = None,
- bounds: tuple[float, float] | None = None,
Bases:
objectA single shape rule: when it is applied, and what it requires.
loandhibound the stretch of the feature the rule applies to (Noneis unbounded; an end is a number or an ordered-categorical band label).boundscarries the two numbers of acap(lo, hi) or amax_step(up, down). Rules join with&intoConstraintRules.- below(x: float | str) ConstraintSpec#
Apply the rule up to
xonly.
- above(x: float | str) ConstraintSpec#
Apply the rule from
xupward only.