我在数据集上运行了不同的模型,但是在测试变量重要性时仍然出现相同的错误:
Error in y - mean(y, rm.na = TRUE) :
non-numeric argument to binary operator
In addition: Warning message:
In mean.default(y, rm.na = TRUE) :
argument is not numeric or logical: returning NA
例如,我正在使用以下命令运行knn模型:
fit_control <- trainControl(## 10-fold CV
method = "repeatedcv",
number = 10,
repeats = 2,
classProbs = TRUE,
verboseIter = TRUE)
和
knn_noise_fit_big <- train(is_exceed ~ .,
data = trainSet,
method = "knn",
# tuneLength = 5,
trControl = fit_control)
谢谢