| prune.path {logicDT} | R Documentation |
Pruning path of a logic decision tree
Description
Using a single fitted logic decision tree, the cost-complexity pruning path containing the ideal subtree for a certain complexity penalty can be computed.
Usage
prune.path(pet, y, Z)
Arguments
pet |
A fitted logic decision tree. This can be extracted from a
|
y |
Training outcomes for potentially refitting regression models in
the leaves. This can be extracted from a |
Z |
Continuous training predictors for potentially refitting regression
models in the leaves. This can be extracted from a |
Details
This is mainly a helper function for cv.prune and should only
be used by the user if manual pruning is preferred.
More details are given in cv.prune.
Value
Two lists. The first contains the sequence of complexity penalties
alpha. The second list contains the corresponding logic decision
trees which can then be substituted in an already fitted
logicDT model, e.g., using
model$pet <- result[[2]][[i]] where result is the returned
object from this function and i is the chosen tree index.