lishiwei2011 / gradientboostedmodels

Automatically exported from code.google.com/p/gradientboostedmodels
0 stars 0 forks source link

shrink.gbm.pred simply doesn't work #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a toy GBM solution
2. Use shrink.gbm with this solution
3. Use shrink.gbm.pred on the resulting system

What is the expected output? What do you see instead?
I'd expect to see a list of numbers.  Instead, I start with a pair of R errors 
(the wrappers for gbm_shrink_grad nor gbm_shrink_pred both omit the cNumClasses 
variable).  Those are straightforward to fix -- one simply adds the expected 
parameters to the .Call items.

Then, however, the predicted values coming out of shrink.gbm.pred are always 
NaN.  I spent a while groveling in the code, and it jsut seems wrong to me -- 
where is the handling of multinomial classes?  Why are all node predictions set 
to R_NaN at line 753 of gbmentry.cpp?  I don't see any leaf node handling 
further down, nor any root node handling, so I can't see how the shrinkages 
could possibly propagate upwards or downwards.

What version of the product are you using? On what operating system?
GBM 2.1
Linux (Ubuntu Lucid Lynx)
R 2.15.3 and 3.0.1

Please provide any additional information below.

Original issue reported on code.google.com by john.mer...@gmail.com on 4 Jun 2013 at 12:27

GoogleCodeExporter commented 8 years ago
Thanks for this.

I've never used shrink.gbm or shrink.gbm.pred and have never looked inside the 
C++. It seems the line 753 issue was introduced between version 1.6 and 2.0, 
but then a lot changed in that gap.

I'm afraid this one will take me ages to get around to, if at all. I'd be 
grateful of volunteers.

Harry

Original comment by harry.southworth on 5 Jun 2013 at 1:10