Skip to content

question

2 messages · Saket Joshi, Brian Ripley

#
Hi all,

I am running R1.5.0 on Unix.
I fitted a tree model my.tree on some data my.data and the tree has only 2
leaves. Now I have some test data new.data

When I run
predict(my.tree, new.data)
it does give a reasonable answer but it takes 60 to 90 seconds to come up
with the answer.

I had expected it to take far less than that considering that the predict
function has just to traverse a tree with 2 nodes and give the answer.
Could anyone tell me why this function is taking so much time to run?

Thanks in advance,
-Saket.


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 Fri, 2 Aug 2002, Saket Joshi wrote:

            
Not on the amount of information you have given.  Take a look at
`Writing R Extensions' or an earlier Programmers' Niche in R-news for how
to profile your run to see where the time is being spent.