Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

misclass.tree

Misclassifications by a Classification Tree


Description

Report the number of mis-classifications made by a classification tree, either overall or at each node.

Usage

misclass.tree(tree, detail = FALSE)

Arguments

tree

Object of class "tree", representing a classification tree.

detail

If false, report overall number of mis-classifications. If true, report the number at each node.

Details

The quantities returned are weighted by the observational weights if these are supplied in the construction of tree.

Value

Either the overall number of misclassifications or the number for each node.

Author(s)

B. D. Ripley

See Also

Examples

ir.tr <- tree(Species ~., iris)
misclass.tree(ir.tr)
misclass.tree(ir.tr, detail=TRUE)

tree

Classification and Regression Trees

v1.0-40
GPL-2 | GPL-3
Authors
Brian Ripley [aut, cre]
Initial release
2019-03-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.