glm-tools / pyglmnet

Python implementation of elastic-net regularized generalized linear models
http://glm-tools.github.io/pyglmnet/
MIT License
279 stars 82 forks source link

Refit not allowed #382

Open GJBoth opened 4 years ago

GJBoth commented 4 years ago

Hi,

Thanks for your package, it's very useful. I tried to fit two different datasets using the same model and I got an error that refitting is not allowed. What is the reason for this? (SK-learn doesn't prompt this.) For me its useful as I prefer not to keep lists of models with exactly the same parameters laying around...

Thanks!

jasmainak commented 4 years ago

I think we got rid of this error. Can you check if you get the error still with the latest version or the development version?

GJBoth commented 4 years ago

In the new version it's indeed fixed, thanks. It hasn't been in the pip version, though. Additional question: what settings do I need to reproduce scikit-learn Lasso results? I'm struggling to get the same result on the same dataset. Right now I have a gaussian noise, alpha=1.0 and similar tolerance, but that doesn't work. Other methods (Celer, for example) do give the same result.

jasmainak commented 4 years ago

did you look at the convergence plot? I think our solvers are not as efficient / optimized as celer or scikit-learn. You might be running out iterations.

jasmainak commented 3 years ago

@GJBoth is this still relevant for you? You might want to use the latest version to see if it fixes the problem