Learn R Programming

kernelshap (version 0.7.0)

print.kernelshap: Prints "kernelshap" Object

Description

Prints "kernelshap" Object

Usage

# S3 method for kernelshap
print(x, n = 2L, ...)

Value

Invisibly, the input is returned.

Arguments

x

An object of class "kernelshap".

n

Maximum number of rows of SHAP values to print.

...

Further arguments passed from other methods.

See Also

kernelshap()

Examples

Run this code
fit <- lm(Sepal.Length ~ ., data = iris)
s <- kernelshap(fit, iris[1:3, -1], bg_X = iris[, -1])
s

Run the code above in your browser using DataLab