Closed normanius closed 3 years ago
Hello @normanius! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
src/group_lasso/_group_lasso.py
:Line 407:55: E261 at least two spaces before inline comment Line 877:9: E265 block comment should start with '# '
test/test_group_lasso.py
:Line 20:26: E124 closing bracket does not match visual indentation
The latest version should pass the sklearn compatibility checks, so hopefully this is fixed.
Hi Ynge
Again me... Probably it's already an issue on your backlog: The estimators do not fully comply with the sklearn interface: Rolling your own estimator. I also found this template useful.
I had a look at this today and was able to pass sklearn's compatibility checks with a couple of edits. I added a corresponding test-case in test/test_group_lasso.py.
Unfortunately, while sklearn now is happy, I broke some of the tests that have
y
as a multi-label withy.shape[1]>1
. I wasn't able to fix this right away (it got late here)... I'm confident that you're more efficient in fixing these issues anyways. Take my commits as suggestions.HTH
Update Note: For sklearn compatibility checks to pass, I had to set
l1_reg=0
andgroup_reg=0
, becauseLogisticGroupLasso
has quite some convergence problems, which sklearn does not tolerate. (One might set could set thepoor_score
tag, but that's not what we want.)To check sklearn compatibility:
Rough overview:
None
, which is interpreted as "each feature forms its own group".fit()
should returnself
LogisticGroupLasso
: lacks memberclasses_
LogisticGroupLasso
: decode result - my fix likely isn't very safe