lishiwei2011 / gradientboostedmodels

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

Error checking is desired for the "n.trees" argument in predict.gbm #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Build a gbm object.
2. Call predict function with assigning zero-length integer to the number of 
trees argument.

What is the expected output? What do you see instead?
An error message is expected, but it goes into an infinite loop and the R 
session becomes unresponsive. 

What version of the product are you using? On what operating system?
mac osx

Please provide any additional information below.
It seems like the LENGTH macro in Rinternals.h returns garbage value for 
zero-length vectors.

Original issue reported on code.google.com by bkcho...@gmail.com on 10 Oct 2013 at 12:19

GoogleCodeExporter commented 8 years ago
Thanks for this.

I've moved the project to Github:
https://github.com/harrysouthworth/gbm

I've added a check for a zero length n.trees

The fix will appear in a future release. If you can't wait, clone the repo from 
github and make your own build.

Harry

Original comment by harry.southworth on 26 Nov 2013 at 2:30