PathResult#

class superglm.PathResult(
lambda_seq: NDArray,
coef_path: NDArray,
intercept_path: NDArray,
deviance_path: NDArray,
n_iter_path: NDArray,
converged_path: NDArray,
edf_path: NDArray | None = None,
separation_path: tuple[str | None, ...] | None = None,
)#

Bases: object

Immutable container for regularization path results.

coef_path and intercept_path are each point’s public coefficients and raw intercept, and deviance_path its fitted deviance. Rebuilding a point’s predictor as X @ coef_path[i] + intercept_path[i] cancels each numeric column’s offset c against the raw intercept, so a row errs by about 2u |c' beta| (u = 2**-53), or 2u c / s of the term’s effect for a column of spread s. The ratio c / s decides it, not the units: a year (c / s near 300) or an epoch time in seconds over months stays near 1e-13 of the effect, while an offset many orders of magnitude above the spread (a raw ID, or a timestamp over a spread of seconds or less) loses visible digits. The fitted model predicts at the last point with the centred predictor; to predict at point i, refit at selection_penalty=lambda_seq[i], which reproduces the point to the solver’s tol. separation_path holds each point’s runtime separation finding, None where its solve had none; fit_path warns once naming the points that have one, or refuses under separation="error".

to_frame()#

Return path telemetry as a pandas DataFrame.

to_telemetry() → dict[str, list]#

Return path telemetry as JSON-serializable lists.