Finds a sequence of nodes of an overfitting evaluation tree which are candidates to be the pruning nodes. Pruning a tree means removing a branch starting from a node.

1 | ```
prune(et)
``` |

`et` |
an evaluation tree; output of "eval.cart", "densplit", ... |

A list containing the following components.

`tree` |
the original tree which was given as the input |

`delnodes ` |
vector giving a sequence of nodes in the order in which we should prune the branches starting from these nodes |

`delend` |
vector whose length is the number of subtrees of the original tree. With the help of "delend" we define the subtrees. Elements of "delend" define a sequence of nodes from "delnodes" in the following way: (1:delend[1]) is the first sequence, (delend[1]+1:delend[2]) is the second sequence, and so on. Then, i:th subtree is the result of pruning branches away whose roots are the nodes which are the first delend[i] elements of delnodes. |

`leafs` |
vector whose length is the number of subtrees of the original tree; number of leafs of the subtrees |

`alfa` |
vector whose length is the number of subtrees of the original tree; value of the corresponding alfa (complexity parameter) for every subtree |

`loglik` |
vector whose length is the number of subtrees of the original tree; the value of the likelihood criterion for the subtree |

Jussi Klemela

1 2 3 4 5 6 7 8 9 10 11 12 13 14 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.