При обучении модели на R с пакетом caret
я получаю сообщение об ошибке при отображении переменных значений модели.Это происходит для нескольких алгоритмов майнинга (bayesglm, glm, naive_bayes, ...).
control <- trainControl(method = "repeatedcv",
number = iterations,
savePredictions = TRUE,
classProbs = TRUE,
sampling = "smote");
modelFit <- train(formulaToUse,
data = dataToAnalyze,
method = miningAlgorithm,
family = "binomial",
preProcess = NULL,
trControl = control,
tuneLength = 4);
plot(varImp(modelFit, scale = TRUE));
приводит к:
Error in auc_(actual, predicted, ranks) :
Not compatible with requested type: [type=character; target=double].
Обратите внимание, что модели добываются с успехом, summary(modelFit)
показывает информацию о модели.
Есть идеи?
R версия 3.4.3, каретка это caret_6.0-79.