sample_ctree: Sample ctree variables from a given conditional inference...

View source: R/approach_ctree.R

sample_ctreeR Documentation

Sample ctree variables from a given conditional inference tree

Description

Sample ctree variables from a given conditional inference tree

Usage

sample_ctree(tree, n_MC_samples, x_explain, x_train, n_features, sample)

Arguments

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_MC_samples

Scalar integer. Corresponds to the number of samples from the leaf node. See an exception when sample = FALSE in setup_approach.ctree().

x_explain

Data.table with the features of the observation whose predictions ought to be explained (test data).

x_train

Data.table with training data.

n_features

Positive integer. The number of features.

Details

See the documentation of the setup_approach.ctree() function for undocumented parameters.

Value

data.table with n_MC_samples (conditional) Gaussian samples

Author(s)

Annabelle Redelmeier


shapr documentation built on April 4, 2025, 12:18 a.m.