GroupLasso#

class superglm.GroupLasso(
lambda1: float | Literal['auto'] | None = None,
flavor: Flavor | None = None,
features: str | list[str] | None = None,
)#

Bases: object

Group lasso penalty: lambda1 * sum_g(w_g * ||beta_g||_2).

Parameters:
lambda1float, {“auto”}, or None

Regularisation strength. None disables selection and "auto" explicitly requests calibration to 10% of lambda_max.

flavorFlavor or None

Optional modifier (e.g. Adaptive) that adjusts group weights based on an initial estimate.

prox_group(
bg: NDArray,
group: GroupSlice,
step: float,
) → NDArray#

Block soft-thresholding for a single group.

prox(
beta: NDArray,
groups: list[GroupSlice],
step: float,
) → NDArray#

Block soft-thresholding proximal operator.

eval(
beta: NDArray,
groups: list[GroupSlice],
) → float#

Penalty value: lambda1 * sum_g(w_g * ||beta_g||_2).