PolynomialCategorical#
- class superglm.PolynomialCategorical(poly_name: str, cat_name: str)#
Bases:
objectVarying-coefficient interaction: polynomial curve per categorical level.
For each non-base level, produces one group of the parent Polynomial’s orthonormal component columns masked by the level indicator.
The per-level columns come from the parent’s stored factor (a deep copy of the fitted parent spec), so margins match the main effect exactly. Note the parent’s orthonormality is a whole-book property: within a single level the masked columns are not orthonormal under the level-conditional weights, and no per-level re-orthogonalization is attempted.
- reconstruct(
- beta: NDArray,
- n_points: int = 200,
Each level’s curve on the global grid.
A level whose curve separates at fit (
_separated_ranges) is read at its own rows’ range and held there beyond it, asscoreholds it, so every report of the curve (relativities, plots, term inference) agrees withpredict.