[R] stack overflow and predict()

Ji Zhu jizhu at umich.edu
Fri Nov 7 23:50:32 CET 2003


Dear R users,

I'm trying to use rpart() to build a classification tree on a big dataset.
The number of samples is n=100 and the number of variables is p=10000.

At first I stored all the data in a data.frame and got a "stack overflow"
error; then I changed the data into a matrix and the problem disappeared.
Now the trouble is when I try to use the predict() function, since each
newdata is a long list with p=10000 elements, the predict() function
doesn't recognize it and simply returns the fitted values at the training
data (rather than the newdata).

Could anyone give me some suggestion on how to proceed?  Thank you.

Regards,

Ji

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ji Zhu                          439 West Hall
Assistant Professor             550 East University
Department of Statistics        Ann Arbor, MI 48109
University of Michigan          (734) 936-2577 (O)
jizhu at umich.edu                 (734) 763-4676 (F)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




More information about the R-help mailing list