Is object of class "permshap"?
is.permshap(object)
An R object.
TRUE
if object
is of class "permshap", and FALSE
otherwise.
fit <- lm(Sepal.Length ~ ., data = iris)
s <- permshap(fit, iris[1:2, -1], bg_X = iris[-1])
#> Exact permutation SHAP values
#>
|
| | 0%
|
|=================================== | 50%
|
|======================================================================| 100%
is.permshap(s)
#> [1] TRUE
is.permshap("a")
#> [1] FALSE