autoplot.model_fit | R Documentation |
This method provides a good visualization method for model results. Currently, only methods for glmnet models are implemented.
## S3 method for class 'model_fit'
autoplot(object, ...)
## S3 method for class 'glmnet'
autoplot(object, ..., min_penalty = 0, best_penalty = NULL, top_n = 3L)
object |
A model fit object. |
... |
For |
min_penalty |
A single, non-negative number for the smallest penalty
value that should be shown in the plot. If left |
best_penalty |
A single, non-negative number that will show a vertical
line marker. If left |
top_n |
A non-negative integer for how many model predictors to label.
The top predictors are ranked by their absolute coefficient value. For
multinomial or multivariate models, the |
The glmnet package will need to be attached or loaded for
its autoplot()
method to work correctly.
A ggplot object with penalty on the x-axis and coefficients on the y-axis. For multinomial or multivariate models, the plot is faceted.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.