The projection pursuit regression function in the base R seems to crash when the optimization level is set to zero, i.e. the initial ridge terms are accepted without refitting. I encountered this problem in an out-of-sample prediction exercise using predict. But further investigation suggests the issue is with the ppr fit and predict just sppeds up the crash. The other optlevels seem to be OK, but I have not done enough testing to say for sure.
I'm using 2.11.1 under the 32-bit Windows XP. I've also tested the codes under a 64-bit Ubuntu and the same problem occurred. By the way, right before Rgui shuts down, the pop-up window suggests it's a runtime error in C++.
Re: Crash report: projection pursuit & predict
Horace Tso <Horace.Tso <at> pgn.com> writes:
> I'm using 2.11.1 under the 32-bit Windows XP. I've also tested the
> codes under a 64-bit Ubuntu and the same
> problem occurred. By the way, right before Rgui shuts down, the \
> pop-up window suggests it's a runtime
> error in C++.
> Here are the codes that cause the crash,
> BH = BostonHousing2[,-c(1:5)]
> dat1 = BH[1:200,]
> dat2 = BH[201:400,]
> mod = ppr(log(cmedv)~., data=dat1, optlevel=0, nterms=2, max.terms=5)
> pred = predict(mod, newdata=dat2)
On 32-bit Ubuntu, clean session (--vanilla), it seems to work the first
time and crash the second:
R version 2.11.1 (2010-05-31)