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

Python Version of GLMnet #1

Open
vingkan opened this issue Jan 15, 2019 · 0 comments
Open

Python Version of GLMnet #1

vingkan opened this issue Jan 15, 2019 · 0 comments

Comments

@vingkan
Copy link
Owner

vingkan commented Jan 15, 2019

The GLMnet model in R from the original project applies ridge (L2) regularization to the inspector-related features, but not any others. I searched for an equivalent version in Python:

  • I could not find an option in Scikit Learn to pass an array of penalties for each feature.
  • I could not find an option for L2 regularization in StatsModels.
  • Finally, I used Glmnet in Python by Jerome Friedman, Trevor Hastie and Rob Tibshirani.

The Glmnet in Python package is only supported for 64-bit linux. I had to deal with a few issues to run the package on my Mac:

  • According to this issue, the package on PyPI does match the master branch of the GitHub repository.
  • I had to follow the steps in this issue to download another GLMnet.so file and move the Fortran files to the folder that the package expected them to be in.

After this, things ran smoothly. I referred to this Jupyter notebook for documentation.

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

1 participant