Re: [問題] 請教各位大神,H2O的使用問題

作者: sacidoO (阿罵)   2017-07-15 22:32:40
不知道原po的train data frame資料裡面是什麼型態呢? 建議處理一下
(ex.assign factor for 字元/類別變數...)
如果轉成h2o前 您的train data frame有處理過factor的話
train.hex應該是不用在assign factor
- 另外數據內有時間變數嗎? 不太清楚h2o能不能處理時間
另外不知到為什麼原po寫x, y等於 1:7跟9呢?
建議改成train.hex 裏面的變數名稱(或是train的- 一樣的 )
p.s.你可以像正常R一樣用names 來看 train.hex的變數名稱
另外我po上官方的code - 不知道設立其他參數有無幫助你的模型:
m2 <- h2o.deeplearning(
model_id="dl_model_faster",
training_frame=train,
validation_frame=valid,
x=predictors,
y=response,
hidden=c(32,32,32), ## small network, runs faster
epochs=1000000, ## hopefully converges earlier...
score_validation_samples=10000, ## sample the validation dataset
(faster)
stopping_rounds=2,
stopping_metric="misclassification", ## could be "MSE","logloss","r2"
stopping_tolerance=0.01
)
出處:
https://github.com/h2oai/h2o-tutorials/tree/master/tutorials/deeplearning
※ 引述《momo123163 (RT-boy)》之銘言:
: [問題類型]:
: 程式諮詢(我想用R 做某件事情,但是我不知道要怎麼用R 寫出來)
: 想請問大神,小弟剛接觸R語言的深度學習
: 按照網路上提供的iris 的範例示範
: 但如果用自己創造的data 就一直出現下圖編譯錯誤
: 想請問一下是我哪裡出問題呢?
: 還是我資料有什麼問題QQ
: 感謝感謝
: 程式碼與編譯錯誤如圖:
: http://imgur.com/a/2NuPQ
: 感謝各位大神的幫忙QQ
作者: sacidoO (阿罵)   2017-07-15 22:34:00
不過範例中的參數數值設立有點大 測試的話用小數值即可測試時 隱藏層 可設一層 EPOCH也設成一個小數值即可

Links booklink

Contact Us: admin [ a t ] ucptt.com