Numeric#

class superglm.Numeric#

Bases: object

A single continuous feature used as-is.

Group lasso on a size-1 group = standard L1 soft-thresholding. The column is passed through without any transformation.

build(
x: NDArray[floating],
sample_weight: NDArray[floating] | None = None,
) → GroupInfo#

Build a single-column design matrix.

transform(
x: NDArray,
) → NDArray#

Transform new data (pass-through).

score(
x: NDArray,
beta: NDArray[floating],
) → NDArray[floating]#

Score the fitted numeric contribution directly on new data.

reconstruct(
beta: NDArray[floating],
) → dict[str, Any]#

Reconstruct the coefficient on the original scale.

relativity_per_unit is exp(coef), as every term reports the exponential of its contribution whatever the link, rounded as exp rounds and without a warning: inf above float64’s range, 0.0 below it. coef is the log relativity.