Description Usage Arguments Value Author(s) See Also Examples

View source: R/prune.R View source: R/delt.R

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 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.