create_ctree: Make all conditional inference trees

View source: R/approach_ctree.R

create_ctreeR Documentation

Make all conditional inference trees

Description

Make all conditional inference trees

Usage

create_ctree(
  given_ind,
  x_train,
  mincriterion,
  minsplit,
  minbucket,
  use_partykit = "on_error"
)

Arguments

given_ind

Numeric value. Indicates which features are conditioned on.

mincriterion

Numeric scalar or vector. (default = 0.95) Either a scalar or vector of length equal to the number of features in the model. Value is equal to 1 - \alpha where \alpha is the nominal level of the conditional independence tests. If it is a vector, this indicates which value to use when conditioning on various numbers of features.

minsplit

Numeric scalar. (default = 20) Determines minimum value that the sum of the left and right daughter nodes required for a split.

minbucket

Numeric scalar. (default = 7) Determines the minimum sum of weights in a terminal node required for a split

use_partykit

String. In some semi-rare cases partyk::ctree runs into an error related to the LINPACK used by R. To get around this problem, one may fall back to using the newer (but slower) partykit::ctree function, which is a reimplementation of the same method. Setting this parameter to "on_error" (default) falls back to partykit::ctree, if party::ctree fails. Other options are "never", which always uses party::ctree, and "always", which always uses partykit::ctree. A warning message is created whenever partykit::ctree is used.

Value

List with conditional inference tree and the variables conditioned/not conditioned on.

Author(s)

Annabelle Redelmeier, Martin Jullum


NorskRegnesentral/shapr documentation built on April 19, 2024, 1:19 p.m.