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
|
flavor
|
Flavor or None
|
Optional modifier (e.g. Adaptive) that adjusts group weights based on an initial estimate. |
None
|
SparseGroupLasso
¶
Sparse group lasso: lambda1 * [(1-alpha) * group_L2 + alpha * L1].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lambda1
|
float, {"auto"}, or None
|
Regularisation strength. |
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
|
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
|
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
|
Ridge
¶
Ridge penalty: lambda1 * ||beta||_2^2 / 2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lambda1
|
float, {"auto"}, or None
|
Regularisation strength. |
None
|
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