H2o data frame error

h2o

#1

I have came across the below mentioned error. can some help me understand what went wrong.

train.h2o<-as.h2o(as.data.frame(my_data_train),destination_frame =“train.h2o” )
test.h2o<-as.h2o(my_data_test[,-12],destination_frame = “test.h2o”)
colnames(train.h2o)

y.dep<-train.h2o[12]
x.indep<-train.h2o[1:11]
str(x.indep)

#Random Forest
rforest.model<-h2o.randomForest(y=y.dep,x=x.indep,training_frame = train.h2o,
ntrees = 100,mtries = 3,max_depth = 4,seed = 1122)

Error in .verify_dataxy(training_frame, x, y) :
x must be column names or indices


#2

Where did u spilit in what ratio??


#3

there is no split, it was already separated.


#4

In rforest.model<-h2o.randomForest(y=y.dep,x=x.indep,training_frame = train.h2o,
ntrees = 100,mtries = 3,max_depth = 4,seed = 1122) X & y should be colnames or indices. So,
X.dep = 1:11
y.dep =12
It will work.
Instead of number you have given the subset of data frame in X&y


#5

Thanks it is solved