sparse_ho.models.WeightedLasso

class sparse_ho.models.WeightedLasso(estimator=None)

Linear Model trained with weighted L1 regularizer (aka weighted Lasso).

The optimization objective for weighted Lasso is:

..math:

||y - Xw||^2_2 / (2 * n_samples) + \sum_i^{n_features} \alpha_i |wi|
Parameters
estimator: instance of ``sklearn.base.BaseEstimator``

An estimator that follows the scikit-learn API.

__init__(estimator=None)

Methods

__init__([estimator])

generalized_supp(X, v, log_alpha)

Generalized support of iterate.

get_L(X)

Compute Lipschitz constant of datafit.

get_beta(X, y, mask, dense)

Return primal iterate.

get_full_jac_v(mask, jac_v, n_features)

TODO

get_jac_residual_norm(Xs, ys, n_samples, ...)

get_jac_v(X, y, mask, dense, jac, v)

Compute hypergradient.

get_mask_jac_v(mask, jac_v)

TODO

get_mat_vec(X, y, mask, dense, log_alpha)

Returns a LinearOperator computing the matrix vector product with the Hessian of datafit.

proj_hyperparam(X, y, log_alpha)

Project hyperparameter on an admissible range of values.

reduce_X(X, mask)

Reduce design matrix to generalized support.

reduce_y(y, mask)

Reduce observation vector to generalized support.

sign(x, log_alpha)

Get sign of iterate.