Dear R community I have a question regarding the value of cost complexity parameter "k" used in "tree" package for pruning purpose. In the example below i used k=0. But if i take the value k=NULL, then it will not plot the resultant tree. Any help in finding the optimum value of "k" is requested. Please give some suggestion in this regard. Thanks
library(tree) ds=iris; iris=transform(iris, Species = factor(Species, labels = letters[1:3])) miris <- tree(Species ~ ., data = iris, control=tree.control(nobs = 150, minsize = 5, mincut = 2)); iris.prun=prune.tree(miris, method=c("misclass"), best = NULL, k=0); iris.prun; summary(iris.prun); plot(iris.prun) best regards Muhammad Azam [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list 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.