powered by
Report the number of mis-classifications made by a classification tree, either overall or at each node.
misclass.tree(tree, detail = FALSE)
Either the overall number of misclassifications or the number for each node.
Object of class "tree", representing a classification tree.
"tree"
If false, report overall number of mis-classifications. If true, report the number at each node.
B. D. Ripley
The quantities returned are weighted by the observational weights if these are supplied in the construction of tree.
tree
ir.tr <- tree(Species ~., iris) misclass.tree(ir.tr) misclass.tree(ir.tr, detail=TRUE)
Run the code above in your browser using DataLab