Create an HTML widget to display variable importance scores with a sparkline representation of each features effect (i.e., its partial dependence function).
add_sparklines(object, fit, digits = 3, free_y = FALSE, verbose = FALSE, ...)# S3 method for vi
add_sparklines(object, fit, digits = 3, free_y = FALSE, verbose = FALSE, ...)
An object that inherits from class "vi".
The original fitted model. Only needed if `vi()` was not called with `method = "firm"`.
Integer specifying the minimal number of significant digits to use for displaying importance scores and, if available, their standard deviations.
Logical indicating whether or not the the y-axis limits should
be allowed to vary for each sparkline. Default is FALSE.
Logical indicating whether or not to print progress. Default
is FALSE.
Additional optional arguments to be passed on to
partial.
An object of class c("datatables", "htmlwidget"); essentially,
a data frame with three columns: Variable, Importance, and
Effect (a sparkline representation of the partial dependence
function). For "lm"/"glm"-like objects, an additional column, called
Sign, is also included which includes the sign (i.e., POS/NEG) of the
original coefficient.
Greenwell, B. M., Boehmke, B. C., and McCarthy, A. J. A Simple and Effective Model-Based Variable Importance Measure. arXiv preprint arXiv:1805.04755 (2018).