Summarizes "shapviz" Object

# S3 method for shapviz
summary(object, n = 2L, ...)

Arguments

object

An object of class "shapviz".

n

Maximum number of rows of SHAP values and feature values to show.

...

Further arguments passed from other methods.

Value

Invisibly, the input is returned.

See also

Examples

S <- matrix(c(1, -1, -1, 1), ncol = 2, dimnames = list(NULL, c("x", "y")))
X <- data.frame(x = c("a", "b"), y = c(100, 10))
object <- shapviz(S, X, baseline = 4)
summary(object)
#> 'shapviz' object representing 
#>   - SHAP matrix of dimension 2 x 2 
#>   - feature data.frame of dimension 2 x 2 
#>   - baseline value of 4
#> 
#> SHAP values of first 2 observations:
#>       x  y
#> [1,]  1 -1
#> [2,] -1  1
#> 
#>  Corresponding feature values:
#>   x   y
#> 1 a 100
#> 2 b  10
#>