I think, I have a datacasting problem using H2O platform in R.
this is the error:
Error: water.exceptions.H2OModelBuilderIllegalArgumentException: Illegal argument(s) for GBM model: GBM_model_R_1568616391145_4. Details: ERRR on field: _validation_frame: Test/Validation dataset has a categorical response column 'gold' with no levels in common with the model
and this is the code:
library(h2o)
kd_h2o = h2o.init(nthreads = -1)
data = readxl::read_excel("C:\\Users\\frzd\\Desktop\\mtx.xlsx")
data_order <- data[order(data$gold),]
data_order$gold=h2o.asfactor(data_order$gold)
Split_ts = .2
Split_vl = .1
indx <- 1:round(length(data$gold)*Split_ts)
ts <- max(indx)
ts <- round(indx*length(data$gold)/ts)
test = as.h2o(data_order[ts,])
train = data_order[-ts,]
indx <- 1:round(length(train$gold)*Split_vl)
ts <- max(indx)
ts <- round(indx*length(train$gold)/ts)
valid = as.h2o(train[ts,])
train = as.h2o(train[-ts,])
fit <- h2o.gbm(y = 15,
training_frame = train,
validation_frame=valid,
# cvControl = list(V = 5),
)
could you guys help me out? :)