2
data1.dl.r2 = vector()
for (i in 1:100) {
if (i==1) {
data1.hex = as.h2o(data1)
} else {
data1.hex = nextdata
}
data1.dl = h2o.deeplearning (x=2:1000,y=1,training_frame=data1.hex,nfolds=5,activation="Tanh",hidden=30,seed=5,reproducible=TRUE)
data1.dl.pred = h2o.predict(data1.dl,data1.hex)
data1.dl.r2[i] = sum((as.matrix(data1.dl.pred)-mean(as.matrix(data1.hex[,1])))^2)/
sum((as.matrix(data1.hex[,1])-mean(as.matrix(data1.hex[,1])))^2) # R-squared
prevdata = as.matrix(data1.hex)
nextpred = as.matrix(h2o.predict(data1.dl,as.h2o(data0[i,])))
colnames(nextpred) = "response"
nextdata = as.h2o(rbind(prevdata,cbind(nextpred,data0[i,-1])))
print(i)
}
這是我的代碼,包含100個觀察值和1000個特徵的數據集(data1)。 當運行此,它給了我的錯誤消息,在50〜第60次迭代 「h2o包:總集羣內存零點
Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = page, :
ERROR MESSAGE:
Total input file size of 87.5 KB is much larger than total cluster memory of Zero , please use either a larger cluster or smaller data.
當我運行‘h20.init()’,它告訴我,總簇存儲器是零。
H2O cluster total nodes: 1
H2O cluster total memory: 0.00 GB
H2O cluster total cores: 8
H2O cluster allowed cores: 8
H2O cluster healthy: TRUE
所以我不知道爲什麼總集羣存儲是零, 和它爲什麼沒有出問題的早期迭代。
當我關閉R Studio並再次打開時,它顯示3.56GB的羣集總內存。 – user67275