title: dataset has a categorical response column in R using H2O deep learning package
body: <p>I think, I have a datacasting problem using H2O platform in R.</p>
  
  <p>this is the error:</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>
  
  <p>and this is the code:</p>
  
  <pre><code>library(h2o)
  kd_h2o = h2o.init(nthreads = -1)
  data = readxl::read_excel("C:\\Users\\frzd\\Desktop\\mtx.xlsx")
  data_order &lt;- data[order(data$gold),]
  data_order$gold=h2o.asfactor(data_order$gold)
  Split_ts = .2
  Split_vl = .1
  indx &lt;- 1:round(length(data$gold)*Split_ts)
  ts &lt;- max(indx)
  ts &lt;- round(indx*length(data$gold)/ts)
  test = as.h2o(data_order[ts,])
  train = data_order[-ts,]
  indx &lt;- 1:round(length(train$gold)*Split_vl)
  ts &lt;- max(indx)
  ts &lt;- round(indx*length(train$gold)/ts)
  valid = as.h2o(train[ts,])
  train = as.h2o(train[-ts,])
  
  fit &lt;- h2o.gbm(y = 15, 
                training_frame = train, 
                validation_frame=valid,
                      # cvControl = list(V = 5),
                 )
  </code></pre>
  
  <p>could you guys help me out? :)</p>