Learn R Programming

shapr (version 0.1.3)

prepare_data: Generate data used for predictions

Description

Generate data used for predictions

Usage

prepare_data(x, ...)

# S3 method for empirical prepare_data(x, seed = 1, n_samples = 1000, index_features = NULL, ...)

# S3 method for gaussian prepare_data(x, seed = 1, n_samples = 1000, index_features = NULL, ...)

# S3 method for copula prepare_data( x, x_test_gaussian = 1, seed = 1, n_samples = 1000, index_features = NULL, ... )

Arguments

x

Explainer object. See explain for more information.

...

Currently not used.

seed

Positive integer. If NULL the seed will be inherited from the calling environment.

n_samples

Positive integer. Indicating the maximum number of samples to use in the Monte Carlo integration for every conditional expectation.

index_features

Positive integer vector. Specifies the indices of combinations to apply to the present method. NULL means all combinations. Only used internally.

x_test_gaussian

Matrix. Test data quantile-transformed to standard Gaussian variables. Only applicable if approach = "empirical".