johnsonshap {sensitivity}R Documentation

Johnson-Shapley indices

Description

johnsonshap computes the Johnson-Shapley indices for correlated input relative importance. These indices allocate a share of the output variance to each input based on the relative weight allocation (RWA) system, in the case of dependent or correlated inputs. WARNING: This function does not work yet.

Usage

johnsonshap(model = NULL, X, N, rank = FALSE, nboot = 0, conf = 0.95)
## S3 method for class 'johnsonshap'
print(x, ...)
## S3 method for class 'johnsonshap'
plot(x, ylim = c(0,1), ...)
## S3 method for class 'johnsonshap'
ggplot(data,  mapping = aes(), ylim = c(0, 1), ..., environment
                 = parent.frame())

Arguments

model

a function, or a model with a predict method, defining the model to analyze.

X

a data frame (or object coercible by as.data.frame) containing a design of experiments (model input variables).

N

an integer giving the size of each replicated design for the Sobol' indices computations via the sobolrep() fct.

rank

logical. If TRUE, the analysis is done on the ranks.

nboot

the number of bootstrap replicates.

conf

the confidence level of the bootstrap confidence intervals.

x

the object returned by johnsonshap.

data

the object returned by johnsonshap.

ylim

the y-coordinate limits of the plot.

mapping

Default list of aesthetic mappings to use for plot. If not specified, must be supplied in each layer added to the plot.

environment

[Deprecated] Used prior to tidy evaluation.

...

arguments to be passed to methods, such as graphical parameters (see par).

Details

No

Value

johnsonshap returns a list of class "johnsonshap", containing the following components:

call

the matched call.

johshap

a data frame containing the estimations of the Johnson-Shapley indices, bias and confidence intervals.

Author(s)

Bertrand Iooss

References

B. Iooss and L. Clouvel, Une methode d'approximation des effets de Shapley en grande dimension, 54emes Journees de Statistique, Bruxelles, Belgique, July 3-7, 2023

See Also

johnson

Examples


#####################################################
# Test case: the non-monotonic Sobol g-function
n <- 1000
X <- data.frame(matrix(runif(8 * n), nrow = n))
x <- johnsonshap(model = sobol.fun, X = X, N = n)
print(x)
plot(x)
library(ggplot2) ; ggplot(x)


[Package sensitivity version 1.30.0 Index]