所以我正在尝试将深度学习模型融入我的数据中,使用tidymodels
. 通用接口是mlp()
,我正在使用fit_resamples()
它来找到外部数据的最佳模型。我不断收到此错误:
ann_model <-
mlp(epochs = 50, hidden_units = 5, dropout = 0.1) %>%
set_engine("nnet", weights = 10000) %>%
set_mode("regression")
ann_wflw <-
workflow() %>%
add_recipe(dados_recipe) %>%
add_model(ann_model)
ann_fit <-
ann_wflw %>%
fit_resamples(resamples = dados_cv)
x Fold01, Repeat1: model: Error in nnet.default(x, y, w, ...): too many (1301) weights
x Fold02, Repeat1: model: Error in nnet.default(x, y, w, ...): too many (1296) weights....
如何更改权重?拜托,我真的很着急。顺便说一句,除了交叉验证之外,还有其他方法可以不过度拟合我的训练数据吗?提前致谢!