skglm.MultiTaskLasso

class skglm.MultiTaskLasso(alpha=1.0, copy_X=True, max_iter=50, max_epochs=50000, p0=10, verbose=0, tol=0.0001, fit_intercept=True, warm_start=False, ws_strategy='subdiff')[source]

MultiTaskLasso estimator.

The optimization objective for MultiTaskLasso is:

`1 / (2 xx n_"samples") ||y - XW||_2 ^ 2 + alpha ||W||_(21)`
Parameters:
alphafloat, optional

Regularization strength (constant that multiplies the L21 penalty).

copy_Xbool, optional (default=True)

If True, X will be copied; else, it may be overwritten.

max_iterint, optional

The maximum number of iterations (subproblem definitions).

max_epochsint

Maximum number of CD epochs on each subproblem.

p0int

First working set size.

verbosebool or int

Amount of verbosity.

tolfloat, optional

Stopping criterion for the optimization.

fit_interceptbool, optional (default=True)

Whether or not to fit an intercept.

warm_startbool, optional (default=False)

When set to True, reuse the solution of the previous call to fit as initialization, otherwise, just erase the previous solution.

ws_strategystr

The score used to build the working set. Can be fixpoint or subdiff.

Attributes:
coef_array, shape (n_features,)

parameter vector (`w` in the cost function formula)

sparse_coef_scipy.sparse matrix, shape (n_features, 1)

sparse_coef_ is a readonly property derived from coef_

intercept_float

constant term in decision function.

n_iter_int

Number of subproblems solved by Celer to reach the specified tolerance.

__init__(alpha=1.0, copy_X=True, max_iter=50, max_epochs=50000, p0=10, verbose=0, tol=0.0001, fit_intercept=True, warm_start=False, ws_strategy='subdiff')[source]

Methods

__init__([alpha, copy_X, max_iter, ...])

fit(X, Y)

Fit MultiTaskLasso model.

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

path(X, Y, alphas[, coef_init, return_n_iter])

Compute MultitaskLasso path.

predict(X)

Predict using the linear model.

score(X, y[, sample_weight])

Return the coefficient of determination of the prediction.

set_params(**params)

Set the parameters of this estimator.

set_score_request(*[, sample_weight])

Request metadata passed to the score method.