Dear List,

The gbm package on Win 7 produces different results for the
relative importance of input variables in R 32-bit relative to R 64-bit. Any
idea why? Any idea which one is correct?

Based on this example, it looks like the relative importance of 2 perfectly
correlated predictors is "diluted" by half in 32-bit, whereas in 64-bit, one
of these predictors gets all the importance and the other gets none. I found
this interesting.

### Sample code

library(gbm)
set.seed(12345)
xc=matrix(rnorm(100*20),100,20)
y=sample(1:2,100,replace=TRUE)
xc[,2] <- xc[,1]
gbmfit <- gbm(y~xc[,1]+xc[,2] +xc[,3], distribution="gaussian")
summary(gbmfit)

### Results on R 2.12.0 (32-bit)

      var  rel.inf
1 xc[, 3] 49.76143
2 xc[, 1] 27.27432
3 xc[, 2] 22.96425
>
### Results on R 2.12.0 (64-bit)
> summary(gbmfit)
      var  rel.inf
1 xc[, 1] 50.23857
2 xc[, 3] 49.76143
3 xc[, 2]  0.00000

Thanks,
Axel.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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 via email to