A wrapper function for conditional inference forests
Source:R/party.R
cond_inference_surv_cforest.Rd
This function is a slightly different API for party::cforest()
that has
several important arguments as top-level arguments (as opposed to being
specified in party::cforest_control()
).
Usage
cond_inference_surv_cforest(
formula,
data,
minsplit = 20L,
maxdepth = 0L,
teststat = "quad",
testtype = "Univariate",
mincriterion = 0,
replace = FALSE,
fraction = 0.632,
mtry = 5L,
ntree = 500L,
...
)
Arguments
- formula
a symbolic description of the model to be fit. Note that symbols like
:
and-
will not work and the tree will make use of all variables listed on the right-hand side offormula
.- data
a data frame containing the variables in the model.
- minsplit
the minimum sum of weights in a node in order to be considered for splitting.
- maxdepth
maximum depth of the tree. The default
maxdepth = 0
means that no restrictions are applied to tree sizes.- teststat
a character specifying the type of the test statistic to be applied.
- testtype
a character specifying how to compute the distribution of the test statistic.
- mincriterion
the value of the test statistic (for
testtype == "Teststatistic"
), or 1 - p-value (for other values oftesttype
) that must be exceeded in order to implement a split.- replace
a logical indicating whether sampling of observations is done with or without replacement.
- fraction
fraction of number of observations to draw without replacement (only relevant if
replace = FALSE
).- mtry
number of input variables randomly sampled as candidates at each node for random forest like algorithms. The default
mtry = 0
means that no random selection takes place.- ntree
number of trees to grow in a forest.
- ...
Other options to pass to
party::cforest()
.
Details
Note that, although party::cforest_unbiased()
is not directly used, the
defaults for cond_inference_forest()
mirror its default values. However,
party::cforest_unbiased()
does not allow several tuning parameters to be
optimized (teststat
, testtype
, mincriterion
, replace
, and fraction
).
If you set pass a party::cforest_unbiased()
object to
cond_inference_forest()
and modify those arguments, their values will be
overwritten.