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)
ggplot object. Layers can be added like any ggplot object
Trained glmnet model
Feature counts - either from training data or test data (choose based on application of interest)
Trained glmnet model (optional) If you want the Y axis to reflect a second set of coefficients, instead of feature counts.
logical If TRUE, then function will return a list with the data.frame used for plotting, as well as the plot itself.