prune | R Documentation |
Using a fitted logicDT
model and a fixed complexity penalty
alpha
, its logic decision tree can be (post-)pruned.
prune(model, alpha, simplify = TRUE)
model |
A fitted |
alpha |
A fixed complexity penalty value. This value should be determined out-of-sample, e.g., performing hyperparameter optimization on independent validation data. |
simplify |
Should the pruned model be simplified with regard to the input terms, i.e., should terms that are no longer in the tree contained be removed from the model? |
Similar to Breiman et al. (1984), we implement post-pruning by first computing the optimal pruning path and then choosing the tree that is pruned according to the specified complexity penalty.
If no validation data is available or if the tree shall be automatically
optimally pruned, cv.prune
should be used instead which
employs k-fold cross-validation for finding the best complexity penalty
value.
The new logicDT
model containing the pruned tree
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.