komiya-atsushi / xgboost-predictor-java

Pure Java implementation of XGBoost predictor for online prediction tasks.
Apache License 2.0
339 stars 108 forks source link

GBTree.predict with ntree_limit set too high for used model throws ArrayIndexOutOfBoundsException #34

Closed jbojar closed 5 years ago

jbojar commented 6 years ago

If ntree_limit parameter in GBTree.predict method is set too high for used model then it throws ArrayIndexOutOfBoundsException.

It would be more convenient if it just evaluated the model with maximum available trees. Especially as it is not possible to obtain max tree limit from Predictor instance.

komiya-atsushi commented 5 years ago

Thank you for your contribution!