deep learning - The object from as.h2o has a little observation in R -
i tried transform r data h2o data using as.h2o
function.
however, number of observations transformed as.h2o
function reduced 10.
there total of 1,000 observations in data. there 700 train data , 300 test data. however, using as.h2o
function has 10 observations.
following full , open source code. can use it. please me.
why data transformed h2o data has 10 observation?
install.packages("h2o") library(h2o) h2o.init(max_mem_size = "10g", nthreads = -1) df<-read.csv("http://freakonometrics.free.fr/german_credit.csv", header=true) f=c(1,2,4,5,7,8,9,10,11,12,13,15,16,17,18,19,20,21) for(i in f) df[,i]=as.factor(df[,i]) library(caret) set.seed(1000) intrain<-createdatapartition(y=df$creditability, p=0.7, list=false) train<-df[intrain, ] test<-df[-intrain, ] str(train) str(test) h2o_train<-as.h2o(train, destination_frame = "h2o_train") h2o_test<-as.h2o(test, destination_frame = "h2o_test") str(h2o_train) str(h2o_test)
this appears oddity of how str()
displays h2oframes, rather actual problem. if in flow (localhost:54321) or call nrow()
on h2o objects, see results expect.
Comments
Post a Comment