print.kernelshap {kernelshap} | R Documentation |
Prints "kernelshap" Object
## S3 method for class 'kernelshap'
print(x, n = 2L, ...)
x |
An object of class "kernelshap". |
n |
Maximum number of rows of SHAP values to print. |
... |
Further arguments passed from other methods. |
Invisibly, the input is returned.
fit <- lm(Sepal.Length ~ ., data = iris)
s <- kernelshap(fit, iris[1:3, -1], bg_X = iris[, -1])
s