This function is based on the tree-based framework provided by the
`rpart`

package (Therneau et. al. 2010). It basically, integrates
the tree growth and tree post-pruning in a single function call. The
post-pruning phase is essentially the 1-SE rule described in the CART
book (Breiman et. al. 1984).

1 |

`form` |
A formula describing the prediction problem |

`data` |
A data frame containg the training data to be used to obtain the tree-based model |

`se` |
A value with the number of standard errors to use in the post-pruning of the tree using the SE rule (defaults to 1) |

`cp` |
A value that controls the stopping criteria used to stop the initial tree growth (defaults to 0) |

`minsplit` |
A value that controls the stopping criteria used to stop the initial tree growth (defaults to 6) |

`verbose` |
The level of verbosity of the function (defaults to F) |

`...` |
Any other arguments that are passed to the |

The x-SE rule for tree post-pruning is based on the cross-validation estimates of the error of the sub-trees of the initially grown tree, together with the standard errors of these estimates. These values are used to select the final tree model. Namely, the selected tree is the smallest tree with estimated error less than the B+x*SE, where B is the lowest estimate of error and SE is the standard error of this B estimate.

A `rpart`

object

Luis Torgo ltorgo@dcc.fc.up.pt

Therneau, T. M. and Atkinson, B.; port by Brian
Ripley. (2010). *rpart: Recursive Partitioning*. R package version
3.1-46.

Breiman, L., Friedman, J., Olshen, R., and Stone,
C. (1984). *Classification and regression trees*. Statistics/Probability Series. Wadsworth & Brooks/Cole
Advanced Books & Software.

Torgo, L. (2010) *Data Mining using R: learning with case studies*,
CRC Press (ISBN: 9781439810187).

http://www.dcc.fc.up.pt/~ltorgo/DataMiningWithR

1 2 3 4 5 6 7 8 9 | ```
data(iris)
tree <- rpartXse(Species ~ ., iris)
tree
## A visual representation of the classification tree
## Not run:
prettyTree(tree)
## End(Not run)
``` |

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.

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.