Generate data used for predictions
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,
...
)
# S3 method for ctree
prepare_data(
x,
seed = 1,
n_samples = 1000,
index_features = NULL,
mc_cores = 1,
mc_cores_create_ctree = mc_cores,
mc_cores_sample_ctree = mc_cores,
...
)
Explainer object. See explain
for more information.
Currently not used.
Positive integer. If NULL
the seed will be inherited from the calling environment.
Integer. The number of obs to sample from the leaf if sample
= TRUE or if sample
= FALSE but n_samples
is less than the number of obs in the leaf.
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.
Matrix. Test data quantile-transformed to standard Gaussian variables. Only applicable if
approach = "empirical"
.
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.
Integer. Same as mc_cores
, but specific for the tree building function
#' Defaults to mc_cores
.
Integer. Same as mc_cores
, but specific for the tree building prediction
function.
Defaults to mc_cores
.