I am making a classification model using H2O in python. I am able to build a GBM model and make predictions on training and test dataset whereas when I build an XGBoost model and try to make predictions.
Below is the GBM code: (Runs perfectly fine)
from h2o.estimators.gbm import H2OGradientBoostingEstimator
model_rf_v3 = H2OGradientBoostingEstimator(model_id='mojo_test_v4', ntrees=259, max_depth=6, categorical_encoding = 'OneHotExplicit', learn_rate = 0.1)
model_rf_v3.train(y = myResponse_rf,x = myCat + myNum, training_frame=hf_train_h2o,
validation_frame = hf_test_h2o)
pred = model_rf_v3.predict(hf_test_h2o)[:,2]
XGBoost code: (Fails)
from h2o.estimators.xgboost import H2OXGBoostEstimator
model_rf_vn = H2OXGBoostEstimator(ntrees=259, learn_rate = 0.05, stopping_metric = "misclassification", categorical_encoding = 'OneHotExplicit', tree_method="hist", grow_policy="lossguide", max_depth = 9)
model_rf_vn.train(y = myResponse_rf,x = myCat + myNum, training_frame=hf_train_h2o,
validation_frame = hf_test_h2o)
pred = model_rf_vn.predict(hf_test_h2o)[:,2] ## Error at this point
Error:
job with key $0300ffffffff$_9cacec5e7e4540e343f43ac2ce3e459e failed with an exception: DistributedException from ha880datanode-14.fab4.prod.booking.com/10.220.205.163:54321: '63', caused by java.lang.ArrayIndexOutOfBoundsException: 63"
If the error would have been in dataset, I think GBM should also given an error. Does the predict function for XGBoost work in a different way or am I missing something?
Thanks in advance,
Vishal