I am training a DRFModel
and while evaluating receiving an exception: Exception in thread "main" java.lang.ClassCastException: hex.ModelMetricsRegression cannot be cast to hex.ModelMetricsBinomial
.
The data has a column called "label" that contains 0 or 1, and that is the target column: dRFParameters._response_column = "label"
. Looks like the model treats the target column values as real numbers.
I had this problem with the python API as well and fixed by using the following on the H2OFrame
: hdf['label'] = hdf['label'].asfactor()
. I am new to scala and h2o. I was wondering what is the best way to force h2o to treat the target column in the H2OFrame
to be binary (Integer).
(This is my first question on stack overflow. Let me know if I need to be more specific or attach the entire code. Thanks.)