View source: R/approach_ctree.R
sample_ctree | R Documentation |
Sample ctree variables from a given conditional inference tree
sample_ctree(tree, n_samples, x_explain, x_train, n_features, sample)
tree |
List. Contains tree which is an object of type ctree built from the party package. Also contains given_ind, the features to condition upon. |
n_samples |
Numeric. Indicates how many samples to use for MCMC. |
x_explain |
Matrix, data.frame or data.table with the features of the observation whose
predictions ought to be explained (test data). Dimension |
x_train |
Matrix, data.frame or data.table with training data. |
n_features |
Positive integer. The number of features. |
sample |
Boolean. True indicates that the method samples from the terminal node of the tree whereas False indicates that the method takes all the observations if it is less than n_samples. |
data.table with n_samples
(conditional) Gaussian samples
Annabelle Redelmeier
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.