hichamjanati / mutar

Multi-task regression in Python
BSD 3-Clause "New" or "Revised" License
26 stars 3 forks source link

warm start for the group lasso #8

Closed georgestod closed 3 years ago

georgestod commented 3 years ago

Great work, I have been using quite a lot and like it a lot! However, I have an error when using the warm start for the Group Lasso: from mutar import GroupLasso import numpy as np X = np.array([[[3, 1], [1, 0], [1, 0]],[[0, 2], [2, 3], [2, 3]]], dtype=float) y = X.sum(axis=2) + 2 grouplasso = GroupLasso(warmstart=True).fit(X, y) grouplasso.fit(X, y).coef

UnboundLocalError: local variable 'coefshared' referenced before assignment

By any chance do you have a quick workaround?

hichamjanati commented 3 years ago

Thanks for pointing this out, I fixed the bug. You need to update mutar with the current dev version

git clone https://github.com/hichamjanati/mutar
cd mutar
pip install -e .
georgestod commented 3 years ago

lightening fast, thanks a lot !