Crash report: projection pursuit & predict

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Crash report: projection pursuit & predict

Horace Tso
Folks,

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++.

Here are the codes that cause the crash,

library(mlbench)
data(BostonHousing2)
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)

Thks.

HT

> sessionInfo()
R version 2.11.1 (2010-05-31)
i386-pc-mingw32

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_2.11.1

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Crash report: projection pursuit & predict

bbolker
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,
>
> library(mlbench)
> data(BostonHousing2)
> 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)
>
> Thks.
>
> HT
>
   On 32-bit Ubuntu, clean session (--vanilla), it seems to work the first
time and crash the second:

> sessionInfo()
R version 2.11.1 (2010-05-31)
i486-pc-linux-gnu

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8  
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C      

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base    

> library(mlbench)
> data(BostonHousing2)
> 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)
>
> library(mlbench)
> data(BostonHousing2)
> 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)

 *** caught segfault ***
address 0xe0000024, cause 'memory not mapped'

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.