harrysouthworth / gbm

Gradient boosted models
Other
106 stars 27 forks source link

Fix bug in predict.gbm #34

Closed erbas closed 9 years ago

erbas commented 9 years ago

The local variable 'best' was never referred to and predict.gbm would crash if n.trees wasn't supplied as an argument. Clearly the default value for n.trees should be the maximum number of trees trained, and I believe that is the intention of the if block.

erbas commented 9 years ago

Seemed easier to propose the fix than describe the problem :)