crit {cubt} | R Documentation |
Computes the criterion used for the tree construction.
crit(B, N,critopt)
B |
Local Data matrix |
N |
Global number of observations |
critopt |
Anova to compute variances, else computes entropy |
Computes the criterion used to split a node. For continuous attributes it computes the sum of variances of the attributes:
∑_j=1^p ∑_i=1^n (x_ij-\bar(x)_j)^2
For discrete attributes it computes the sum of entropies of each component:
∑_j=1^p ∑_l=1^{L_j} -p_{lj} log(p_{lj})
where p_lj is the proportion of observations from category l for variable j.
Badih Ghattas