cost_error: cost_error

Description Usage Arguments Value

Description

function that calculate the misclassification error of the subtree stremming from node penalized by alpha

Usage

1
cost_error(node, tree, alpha)

Arguments

node

the number of the node in the tree tree

tree

a tree. A data frame returned by the function CARTGV and which summarizes the resulted CARTGV tree.

alpha

a positive real. It is the value of the complexity paramter in the cost-complexity criterion.

Value

a numeric indicating the misclassification error of the subtree stremming from node penalized by alpha.


dtrfgv/dtrfgv documentation built on May 6, 2019, 8:02 p.m.