[R] loess function takes long to estimate

Robert A'gata rhelpacc at gmail.com
Sat Mar 5 03:52:41 CET 2011


Hi,

I have 2 questions regarding using loess function in stats package.

1. I have about 1 million points. I did loess with alpha=0.5 and
degree=1 and 2 regressors. It has run for more than 5 hrs on 64bit
16CPU and 64GB server (with no other process running). I am wondering
if this is usual? And if there is anyway to make it run faster?
2. I noticed a difference in RAM consumption when specifying loess
function differently. The first case is I ran loess(z ~
x+y,data=X,degree=1,alpha=.5) where my X has about 50 columns. The
second case I trimmed X to only contain x,y and z. Then run loess(z ~
x+y, data=SmallX, degree=1, alpha=.5). I find that the second case
consumes only 4% of RAM whereas the first case uses up to 33%. I'd
like to know how loess handles input data under the hood? It seems to
me it attaches the whole data into memory and hence results in what I
observed. Is my understanding correct?

Thank you in advance.

Regards,

Robert



More information about the R-help mailing list