himalaya.lasso.solve_sparse_group_lasso

himalaya.lasso.solve_sparse_group_lasso(X, Y, groups=None, l21_reg=0.05, l1_reg=0.05, max_iter=300, tol=0.0001, momentum=True, initial_coef=None, lipschitz=None, n_targets_batch=None, progress_bar=True, debug=False)[source]

Solves the sparse group Lasso.

Parameters
Xarray of shape (n_samples, n_features)

Input features.

Yarray of shape (n_samples, n_targets)

Target data.

groupsarray of shape (n_features, ) or None

Encoding of the group of each feature. If None, all features are gathered in one group, and the problem is equivalent to the Lasso.

l21_regfloat, or array of shape (n_targets, )

Regularization parameter for the group Lasso.

l1_regfloat, or array of shape (n_targets, )

Regularization parameter for the Lasso.

max_iterint > 0

Maximum number of iterations.

tolfloat > 0

Tolerance of the stopping criterion.

momentumbool

If True, use acceleration in the projected gradient descent.

initial_coefNone, or array of shape (n_features, n_targets)

Initial value for the projected gradient descent.

lipschitzfloat or None

Lipschitz constant of the gradient. If None, it will be estimated from X using power iterations.

n_targets_batchint or None

Size of the batch for computing predictions. Used for memory reasons. If None, uses all n_targets at once.

progress_barbool

If True, display a progress bar over batches and iterations.

debugbool

If True, compute the objective function at each iteration, and return the list of results (of the last batch) along with the final coefficients.

Returns
coefarray of shape (n_features, n_targets)

Coefficient of the linear model.