Hello all, 
I'm making a decision tree with the rpart package. I want to prune the tree and 
in many tutorials it says to use cptable. Like so: opt <- 
which.min(model_rpart$cptable[, "xerror"])
The problem is that when I look up model_rpart$cptable it only show the columns 
CP, nsplit, rel error. So xerror and xstd are missing. How can this be? 
Model looks like this: model <- rpart(Product~. , data=trainData, 
control=rpart.control(minsplit=50, cp=0.002, xval=0))

Thank you. 
Kim                                       
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to