Generate data used for predictions

prepare_data(x, ...)

# S3 method for independence
prepare_data(x, index_features = NULL, ...)

# S3 method for empirical
prepare_data(x, index_features = NULL, ...)

# S3 method for gaussian
prepare_data(x, index_features = NULL, ...)

# S3 method for copula
prepare_data(x, index_features = NULL, ...)

# S3 method for ctree
prepare_data(
  x,
  index_features = NULL,
  mc_cores = 1,
  mc_cores_create_ctree = mc_cores,
  mc_cores_sample_ctree = mc_cores,
  ...
)

Arguments

x

Explainer object. See explain for more information.

...

Currently not used.

index_features

List. Default is NULL but if either various methods are being used or various mincriterion are used for different numbers of conditioned features, this will be a list with the features to pass.

mc_cores

Integer. Only for class ctree currently. The number of cores to use in paralellization of the tree building (create_ctree) and tree sampling (sample_ctree). Defaults to 1. Note: Uses parallel::mclapply which relies on forking, i.e. uses only 1 core on Windows systems.

mc_cores_create_ctree

Integer. Same as mc_cores, but specific for the tree building function #' Defaults to mc_cores.

mc_cores_sample_ctree

Integer. Same as mc_cores, but specific for the tree building prediction function. Defaults to mc_cores.

seed

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

Value

A `data.table` containing simulated data passed to prediction.