modelPlot | R Documentation |
Plots feature counts and coefficients from a trained LASSO model
This plots the coefficients from a trained LASSO model.
modelPlot(model1, counts, model2 = NULL, dat = FALSE)
model1 |
Trained glmnet model |
counts |
Feature counts - either from training data or test data (choose based on application of interest) |
model2 |
Trained glmnet model (optional) If you want the Y axis to reflect a second set of coefficients, instead of feature counts. |
dat |
logical If TRUE, then function will return a list with the data.frame used for plotting, as well as the plot itself. |
ggplot object. Layers can be added like any ggplot object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.