plot.interpret: Plot regularized model coefficients

Description Usage Arguments Value See Also Examples

View source: R/interpret.R

Description

Plot regularized model coefficients

Usage

1
2
3
## S3 method for class 'interpret'
plot(x, include_intercept = FALSE, max_char = 40, title,
  caption, font_size = 11, point_size = 3, print = TRUE, ...)

Arguments

x

A interpret object or a data frame with columns "variable" and "coefficient"

include_intercept

If FALSE (default) the intercept estimate will not be plotted

max_char

Maximum length of variable names to leave untruncated. Default = 40; use Inf to prevent truncation. Variable names longer than this will be truncated to leave the beginning and end of each variable name, bridged by " ... ".

title

Plot title. NULL for no title; character for custom title. If left blank contains the model class and outcome variable

caption

Plot caption, appears in lower-right. NULL for no caption; character for custom caption. If left blank the caption will contain info including the hyperparameter values of the model used by interpret to determine coefficient estimates.

font_size

Relative size of all fonts in plot, default = 11

point_size

Size of dots, default = 3

print

Print the plot? Default = TRUE

...

Unused

Value

A ggplot object, invisibly.

See Also

interpret

Examples

1
2
3
machine_learn(mtcars, outcome = mpg, models = "glm", tune = FALSE) %>%
  interpret() %>%
  plot(font_size = 14)

healthcareai documentation built on Sept. 2, 2018, 1:03 a.m.