[R] decision/classification trees with fewer than 20 objects
patriciagraf at aon.at
patriciagraf at aon.at
Mon Mar 5 21:52:34 CET 2012
Hi!
I'm trying to construct and plot a decision tree to class a set of only 8 objects and tried to use the rpart and tree function, but get a error message both times:
rpart: fit is not a tree, just a root
tree: cannot plot singlenode tree
I read in the post 'question regression trees' that rpart doesn't split a set of fewer than 20 objects...so I guess the same holds true for the tree function?
My questions therefore are:
How can I change the function arguments in either the rpart or the tree function so they work for a set of less than 20 objects? I looked at the function body, but since I'm new to R, I couldn't find the according argument.
Or is there any other decision tree function for small datasets?
Many Thanks,
Patricia
More information about the R-help
mailing list