gpt4 book ai didi

r - 在 Caret 中使用 frbs 包中的 SBC 时出现错误 "Something is wrong; all the RMSE metric values are missing"

转载 作者:行者123 更新时间:2023-12-02 14:23:12 27 4
gpt4 key购买 nike

我一直在尝试使用 Caret for R 中“frbs”包中的“SBC”方法来拟合模型。我在不同包的 SO 中看到了类似的问题,并尝试了解决方案,但它们似乎不起作用就我而言。我提供了一个使用 iris 数据集实现可重复性的代码片段。

library(caret)
data("iris")
grid<-expand.grid(r.a = c(0.5),
eps.high = c(0.5),
eps.low = c(0))

Fit <- train(Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width, data = iris,
method = "SBC",
# trControl = fitControl,
tuneGrid=grid,
verbose = TRUE)

Fit$results

得到的错误是:

Something is wrong; all the RMSE metric values are missing:
RMSE Rsquared
Min. : NA Min. : NA
1st Qu.: NA 1st Qu.: NA
Median : NA Median : NA
Mean :NaN Mean :NaN
3rd Qu.: NA 3rd Qu.: NA
Max. : NA Max. : NA
NA's :3 NA's :3
Error in train.default(x, y, weights = w, ...) : Stopping
In addition: There were 50 or more warnings (use warnings() to see the first 50)

我检查了警告(),它显示“Resample17 模型拟合失败:r.a=0.5,eps.high=0.5,eps.low=0 frbs.learn 中的错误(data.train = 结构(c(3.5, 3, 3.2, 3.1, 3.4, 3.4, : .....”。我什至尝试单独安装 frbs 包。此外,我还确保变量的类不是因素,即使对于我的数据也是如此。

我的问题是如何修复此错误以及为什么会发生此错误。任何帮助将不胜感激。

提前致谢。

最佳答案

感谢 Max Kuhn,问题已得到解决。 Caret 的 github 页面中的解决方案链接为 here .

关于r - 在 Caret 中使用 frbs 包中的 SBC 时出现错误 "Something is wrong; all the RMSE metric values are missing",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40838476/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com