skglm.experimental.IterativeReweightedL1¶
- class skglm.experimental.IterativeReweightedL1(datafit=<skglm.datafits.single_task.Quadratic object>, penalty=<skglm.penalties.separable.L0_5 object>, solver=None, n_reweights=5)[source]¶
Reweighted L1-norm estimator.
This estimator solves a non-convex problems by iteratively solving convex surrogates involving weighted L1 norms.
- Parameters:
- datafitinstance of BaseDatafit, optional
Datafit. If None,
datafit
is initialized as aQuadratic
datafit.datafit
is replaced by a JIT-compiled instance when calling fit.- penaltyinstance of BasePenalty, optional
Penalty. If None, penalty is initialized as a
L0_5
penalty. penalty is replaced by a JIT-compiled instance when calling fit.- solverinstance of BaseSolver, optional
Solver. If None,
solver
is initialized as anAndersonCD
solver.- n_reweightsint, optional
Number of reweighting performed (convex surrogates solved).
References
[1]Candès et al. (2007), Enhancing sparsity by reweighted l1 minimization https://web.stanford.edu/~boyd/papers/pdf/rwl1.pdf
- Attributes:
- coef_array, shape (n_features,)
Parameter vector (`w` in the cost function formula).
- loss_history_list
Objective history after every reweighting.
- __init__(datafit=<skglm.datafits.single_task.Quadratic object>, penalty=<skglm.penalties.separable.L0_5 object>, solver=None, n_reweights=5)[source]¶
Methods
__init__
([datafit, penalty, solver, n_reweights])fit
(X, y)Fit the model according to the given training data.
get_metadata_routing
()Get metadata routing of this object.
get_params
([deep])Get parameters of the estimators including the datafit's and penalty's.
predict
(X)Predict target values for samples in X.
set_params
(**params)Set the parameters of this estimator.