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

Update glmnet source #46

Open
jolars opened this issue Jul 6, 2020 · 5 comments
Open

Update glmnet source #46

jolars opened this issue Jul 6, 2020 · 5 comments

Comments

@jolars
Copy link

jolars commented Jul 6, 2020

The glmnet source in this repository is outdated, dating back to 2015. The glmnet fortran backbone has since been updated several times. Please consider updating to the latest version.

The source files can be found at https://github.com/cran/glmnet/tree/master/src

@JackDunnNZ
Copy link
Collaborator

I updated the binary builder repo to the latest source: JuliaPackaging/Yggdrasil#2028

However, when I try using the new JLL version it doesn't seem to work, so help may be needed debugging that.

I looked at the diff between the source we are using and the latest copy from the glmnet repo, and the good news is that it seems like the changes are largely cosmetic, with the biggest change being the introduction of a progress meter integrated with R. I couldn't find any significant changes to the actual algorithm from a quick look through:
https://gist.github.com/JackDunnNZ/b04d15fc48fb33db9cff248582c6bc46

@devmotion
Copy link
Member

@JackDunnNZ
Copy link
Collaborator

Sorry, my comment was in reference to changes in the underlying glmnet fortran code, which based on the diff above seems to be largely unchanged - it seems that all of the changes in the recent releases are in the R code instead, and could be ported into Julia without having to update the underlying libglmnet.

@devmotion
Copy link
Member

From the blog post I got the impression that this generalization was only possible by generalizing the Fortran code as well:

Before v4.0, glmnet() could only optimize the penalized likelihood for special GLM families (e.g. ordinary least squares, logistic regression, Poisson regression). For each family, which we specified via a character string for the family parameter, we had custom FORTRAN code that ran the modified IRLS algorithm above. While this was computationally efficient, it did not allow us to fit any penalized GLM of our choosing.

From v4.0 onwards, we can do the above for any GLM family in practice. [...] Underneath the hood, instead of having custom FORTRAN code for each family, we have a FORTRAN subroutine that solves (2) efficiently.

@JackDunnNZ
Copy link
Collaborator

Well they probably know better than I do 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants