I have trained and saved my H2O AutoML model. after reloading, while I am using predict method, I am getting below error: java.lang.IllegalArgumentException: Test/Validation dataset has a non-categorical column 'response' which is categorical in the training data
I have not specified any encoding while model creation but I am getting this error now. Can anyone help me on this issue.
Any help will be highly appreciated.
This issue related is with new examples data in particular column that doesn't exist in traing set. I use parsing column types to numeric (or string) in this cases.
def _convert_h2oframe_to_numeric(h2o_frame, training_columns):
for column in training_columns:
h2o_frame[column] = h2o_frame[column].asnumeric()
return h2o_frame
Remember to use this function for training and prediction process.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With