Description Usage Arguments Value References
View source: R/add_sparklines.R
Create an HTML widget to display variable importance scores with a sparkline representation of each features effect (i.e., its partial dependence function).
1 2 3 4  add_sparklines(object, fit, digits = 3, free_y = FALSE, verbose = FALSE, ...)
## S3 method for class 'vi'
add_sparklines(object, fit, digits = 3, free_y = FALSE, verbose = FALSE, ...)

object 
An object that inherits from class 
fit 
The original fitted model. Only needed if 'vi()' was not called with 'method = "firm"'. 
digits 
Integer specifying the minimal number of significant digits to use for displaying importance scores and, if available, their standard deviations. 
free_y 
Logical indicating whether or not the the yaxis limits should
be allowed to vary for each sparkline. Default is 
verbose 
Logical indicating whether or not to print progress. Default
is 
... 
Additional optional arguments to be passed on to

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 ModelBased Variable Importance Measure. arXiv preprint arXiv:1805.04755 (2018).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.