# Prepares for pruning an overfitting evaluation tree

### Description

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.

### Usage

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

### Arguments

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

### Value

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 |

### Author(s)

Jussi Klemela

### See Also

`densplit`

,
`eval.pick`

### Examples

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

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.