yngvem / group-lasso

Group Lasso implementation following the scikit-learn API
MIT License
105 stars 32 forks source link

Typo in _group_lasso.py raises error when applying GridSearchCV #27

Closed ckj96 closed 3 years ago

ckj96 commented 3 years ago

`_group_lasso.py

    super().__init__(
        groups=groups,
        l1_reg=l1_reg,
        group_reg=group_reg,
        n_iter=n_iter,
        tol=tol,
        scale_reg=scale_reg,
        subsampling_scheme=subsampling_scheme,
        fit_intercept=fit_intercept,
        random_state=random_state,
        warm_start=warm_start,
        old_regularisation=old_regularisation,
        supress_warning=supress_warning,
    )
    self.frobenius_lipchitz = frobenius_lipschitz

`

I believe self.frobenius_lipchitz is a typo and it should be self.frobenius_lipschitz for consistency. I was trying to use sklearn.model_selection.GridSearchCV to choose hyperparamters for this estimator, and it raised an error ' GroupLasso object has no attributre frobenius_lipschitz', which led me finding this typo.

sroet commented 3 years ago

Hey, I ran into an identical issue and proposed a change. ~I don't know how active this repository is, but if you want, you can install the patch by running: pip install git+https://github.com/sroet/group-lasso.git@patch-1 (which will install the version of the code on that branch)~

EDIT: the fix got merged in, to install the current master branch (until there is a pypi release) is: pip install git+https://github.com/yngvem/group-lasso.git