Skip to content

tree() - Tree is too big

2 messages · Henrik Bengtsson, Brian Ripley

#
I am using tree() in the library tree to learn regression trees. Once in a
while I am getting the error "Tree is too big". From the same data set, but
with randomized subsets I am learning several tree model and in the end of
the day I would like to look at some of the properties across trees.

My problem: I have for loop containing a call to tree(). However, since
tree() returns an error about every 30-50 time due to "Tree is too big" the
execution is stopped. Since each call to tree() takes a long time I would
like to run the  for loop over night. I have tried

  options(error = expression(NULL))

to make [R] ignore the errors, but it seems that tree() doesn't respond to
this. Is this correct? Any other suggestions?

Thanks

Henrik Bengtsson
h e n r i k b @ b r a j u . c o m

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Sat, 9 Jun 2001, Henrik Bengtsson wrote:

            
Nothing to do with tree.  Probably you should be using try(). An error
exits the for loop, and then you asked the session to continue.  You got
what you asked for, but not what you wanted?

However, I suggest that you should be trying to solve the problem, which is
probably that you really are trying to grow too big trees.  I guess you
have a large dataset, and need to adjust the control parameters.
See ?tree.control, especially minsize and mindev.