作者a126040023 (TRAMI)
看板R_Language
標題[問題] caret中的dnn無法處理classification問題
時間Sun Apr 5 17:50:47 2015
[問題敘述]:
我本來想用caret來對models作ensembling 但在用dnn作訓練時會出現以下的錯誤訊息
final tuning parameters could not be determined
後來我自己簡單做了一個dataset來測試發現dnn可以處理regression但沒辦法處理
classification的問題。我在網路上找到以下的方法 但也沒效
https://github.com/topepo/caret/issues/73
請問有人有遇到相同或類似的問題嗎?
[程式範例]:
set.seed(123)
library(caret)
x <- rnorm(500)
y <- rnorm(500) + x
z <- as.factor(sample(0:1,500,replace = TRUE))
data <- data.frame(x = x, y = y, z = z)
model_works <- train(x~., data = data, method = 'dnn')
model_fails <- train(z~., data = data, method = 'dnn')
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 122.116.30.40
※ 文章網址: https://webptt.com/m.aspx?n=bbs/R_Language/M.1428227452.A.A5F.html
1F:→ andrew43: 我也照著做,一樣沒用。把這篇文翻譯後貼到issue? 04/06 15:33