term#
- superglm.term(column: str, spec: FeatureSpec) BoundTerm#
Attach an existing feature specification to an input column.
Use this for specifications without a shorthand, such as
Polynomial, or to reuse a configured specification. The declaration owns a copy; building the model’s design happens during fitting.- Parameters:
- columnstr
Name of a column in the fit and prediction frames.
- specFeatureSpec
A main-effect specification. Use
interactionfor interactions.
- Returns:
- BoundTerm
A declaration accepted by family predictor helpers.
Examples
>>> from superglm import Numeric, term >>> density = term("density", Numeric()) >>> density.column 'density'