Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: AdaptiveLasso and AdaptiveLassoCV #169

Closed
wants to merge 29 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1971397
Add AdaptiveLasso and AdaptiveLassoCV classes
mathurinm Nov 11, 2020
86287c5
doc and docstrings
mathurinm Nov 11, 2020
82e1fbe
Add a test, disable warm starting theta
mathurinm Nov 11, 2020
6833e7a
forgot to commit test
mathurinm Nov 11, 2020
3684efa
Use reweighting in LassoCV, add example
mathurinm Nov 11, 2020
fbc527b
example
mathurinm Nov 11, 2020
95cc5f0
fix self.model
mathurinm Nov 11, 2020
a92b530
Improve example
mathurinm Nov 11, 2020
98b0766
Better description + Readme
mathurinm Nov 11, 2020
ddd12bb
invert loop over alphas and reweightings
mathurinm Dec 7, 2020
f96e3e3
messed up rebase
mathurinm Jan 20, 2021
ad93c8d
Ignore infinity weights in primal, recompute theta always
mathurinm Jan 20, 2021
5ec3776
other messup in rebase
mathurinm Jan 20, 2021
0a8dcf6
make docstring test pass
mathurinm Jan 20, 2021
3922fdc
Flake
mathurinm Jan 20, 2021
7332a54
avoid division by zero warning
mathurinm Jan 21, 2021
587bec8
a broken test that is not fixed by disabling screening
mathurinm Jan 21, 2021
e683519
even simpler failing case
mathurinm Jan 21, 2021
1fe0aff
Fix: mismatch between infinite weights and non zero w[j]
mathurinm Jan 21, 2021
2ec58ff
script to play with AdaptiveLassoCv path
mathurinm Jan 21, 2021
f62a7d0
no screening for non zero feature
mathurinm Jan 21, 2021
0c5eb40
better example adaptive
mathurinm Feb 17, 2021
d764302
fix new example
mathurinm Feb 17, 2021
498b887
improve example
mathurinm Feb 17, 2021
49c99da
Merge branch 'master' of github.com:mathurinm/celer into adaptivelassocv
mathurinm Feb 17, 2021
bc5bd52
flake8
mathurinm Feb 17, 2021
28b18db
Merge branch 'master' of github.com:mathurinm/celer into adaptivelassocv
mathurinm Feb 18, 2021
98d834f
flexible reweighting function
mathurinm Mar 14, 2021
93963af
rm print, fix missing abs in sqrt weights
mathurinm Mar 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make docstring test pass
mathurinm committed Jan 20, 2021
commit 0a8dcf61ecf1b78edde19f88ae6f49106dfc7687
2 changes: 1 addition & 1 deletion celer/dropin_sklearn.py
Original file line number Diff line number Diff line change
@@ -279,7 +279,7 @@ def _more_tags(self):


class AdaptiveLasso(Lasso):
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am now thinking this is a bad name, as adaptive Lasso takes weights equal to 1 / w^ols_j, and it performs a single Lasso.
What we implement is rather iterative l1 reweighting (Candes Wakin Boyd paper).

IterativeReweightedLasso seems more correct for me, but it does not pop up on google, and I don't know if it good for visibility. When people talk about it in scikit-learn, they say adaptive lasso : scikit-learn/scikit-learn#4912
@agramfort @josephsalmon do you have an opinion ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main naming issue to me is that an estimator should be well-defined mathematically; then the implementation is something under the hood for the user.

Here, the algorithm you are proposing is a DC-programming (à la Gasso et al. 2009) approach for solving sparse regression with \ell_0.5 regularization (also referred to as reweighted l1 by Cands et al.).
Hence, I would be in favor of separating the "theoretical" estimator from the algorithms used (for instance a coordinate descent alternative could be considered as another solver for sparse regression with \ell_0.5 regularization).

I agree that AdaptiveLasso is originally 2-step:

  1. OLS
  2. Lasso reweighted with weights controlled by step 1.

But I think this is vague enough in the original article (any consistent estimator can be used in the first step, not only OLS), so we can reuse this naming.

Potentially, the exponent \gamma (corresponding to the \ell_q norm used in the Adaptive Lasso paper) could be an optional parameter something like:

lq_norm = 0.5

(with the possibility to add more variants later on).

So in the end, I won't bother too much about the naming and stick to AdaptiveLasso as a good shortcut.

r"""
"""
AdaptiveLasso scikit-learn estimator based on Celer solver.

With :math:`n` the number of samples, the optimization objective for Lasso