getNode function is now defined here to help us identify the best split for the classification problem. For the
Kyphosis dataset from the
rpart package, we plot the classification tree by using the
rpart function. The tree is reobtained by using the
split="information", construct a classification tree based on the cross-entropy information for the kyphosis data with the following code:
ky_rpart <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis,parms=list(split="information"))
ex_rpartby using ...