Skip to content

Penalties

GroupLasso

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

Parameters:

Name Type Description Default
lambda1 float, {"auto"}, or None

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

None
flavor Flavor or None

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

None

prox_group(bg, group, step)

Block soft-thresholding for a single group.

prox(beta, groups, step)

Block soft-thresholding proximal operator.

eval(beta, groups)

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

SparseGroupLasso

Sparse group lasso: lambda1 * [(1-alpha) * group_L2 + alpha * L1].

Parameters:

Name Type Description Default
lambda1 float, {"auto"}, or None

Regularisation strength. None disables selection and "auto" explicitly requests automatic calibration.

None
alpha float

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

0.5
flavor Flavor or None

Optional modifier (e.g. Adaptive).

None

prox_group(bg, group, step)

L1 soft-threshold then group L2 prox for a single group.

prox(beta, groups, step)

Proximal operator via decomposition: L1 soft-threshold then group L2 prox.

eval(beta, groups)

Penalty value.

GroupElasticNet

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

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

Parameters:

Name Type Description Default
lambda1 float, {"auto"}, or None

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

None
alpha float

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

0.5
flavor Flavor or None

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

None

prox_group(bg, group, step)

Closed-form composite proximal operator for a single group.

prox(beta, groups, step)

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

eval(beta, groups)

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

Ridge

Ridge penalty: lambda1 * ||beta||_2^2 / 2.

Parameters:

Name Type Description Default
lambda1 float, {"auto"}, or None

Regularisation strength. None disables shrinkage and "auto" explicitly requests automatic calibration.

None

prox_group(bg, group, step)

Closed-form proximal operator for a single group.

prox(beta, groups, step)

Closed-form proximal operator: beta / (1 + step * lambda1).

eval(beta, groups)

Penalty value: lambda1 * ||beta||_2^2 / 2.

Adaptive

Adaptive weighting flavor.

Computes per-group weights inversely proportional to the initial estimate's group norms. Groups with large initial coefficients get smaller penalties (kept more easily); groups with small coefficients get larger penalties (zeroed more aggressively).

This gives the adaptive group lasso better oracle properties than the plain group lasso (Zou, 2006; Wang & Leng, 2008).

Parameters:

Name Type Description Default
expon float

Exponent for the inverse weighting. Higher values increase the contrast between large and small groups.

1.0
eps float

Small constant to avoid division by zero for initially-zeroed groups.

1e-06

adjust_weights(groups, beta_init, group_matrices=None)

Return new GroupSlice list with adaptive weights.

When group_matrices is provided, uses fitted-value norms ||X_g beta_g|| / sqrt(n) (RMS contribution to eta) instead of raw coefficient norms. This is scale-invariant across groups with different reparametrizations (e.g. SSP splines).

Without group_matrices, falls back to coefficient norms: new_weight_g = sqrt(p_g) / (||beta_init_g|| + eps)^expon