GroupElasticNet#

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

Bases: object

Group elastic net: lambda1 * [alpha * group_L2 + (1-alpha)/2 * L2^2].

alpha=1.0 → pure group lasso, alpha=0.0 → pure ridge.

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

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

alphafloat

Mixing parameter in [0, 1]. 1 = pure group lasso, 0 = pure ridge.

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#

Closed-form composite proximal operator for a single group.

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

Apply the closed-form group elastic-net prox to each group.

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

Penalty value: lambda1 * [alpha * group_L2 + (1-alpha)/2 * L2^2].