interaction#

superglm.interaction(
spec: InteractionSpec,
*,
name: str | None = None,
) → BoundInteraction#

Use an existing interaction specification inside a predictor.

Declare the specification’s parent terms in the same predictor. Their order within the specification is preserved, even when the predictor’s declarations appear in a different order.

Parameters:
specInteractionSpec

A supported interaction, such as SplineCategorical or FactorSmooth.

namestr, optional

Name used in model results. By default, use the factor smooth’s own name or join a two-parent interaction’s column names with ":".

Returns:
BoundInteraction

An interaction declaration accepted by family predictor helpers.

See also

ti

Shorthand for a two-spline interaction-only tensor.