This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello! My name is Amir. I've been using GLMNet for the past couple years and I can tell you that is one of the go-to packages in industry especially in healthcare! So, I had to develop multiple helper functions to visualize the outputs and I was like why not to send a PR. Hope you guys accept it.
I have added a new .py file
plotting.py
. In this file, two main functions are written:coeff_path_plot
andcv_score_plot
. In this way, the user can run the plots by importing the functions from plotting. In addition to this, the class methods are written for bothlogitnet.py
andelasticnet.py
. So, the user can have plots by runningmodel.plot_cv_score()
ormodel.plot_coeff_path()
.In terms of new dependency, I have added
matplotlib
andpandas
to thedev-requirements.txt
file. I did need to havepandas
to figure-out if the inputX
is inpd.DataFrame
format to use the column names for legends forplot_coeff_path
module. Other than that, thepandas
is not required. However, I believe it would be good if we keep it.I have also added an
example
directory with twoJupyter Notebook
to show how the new feature works.I would probably need some help in testing part (one of them failed!). I appreciate it.
Here is the snapshots of the plots:
NOTE All plots are customizable.