Caret objecting to outcomes labels: Error: At least one of the class levels is not a valid R variable name
问题 caret gives me the error below. I'm training a SVM for prediction starting from a bag of words and wanted to use caret to tune the C parameter, however: bow.model.svm.tune <- train(Training.match ~ ., data = data.frame( Training.match = factor(Training.Data.old$Training.match, labels = c('no match', 'match')), Text.features.dtm.df) %>% filter(Training.Data.old$Data.tipe == 'train'), method = 'svmRadial', tuneLength = 9, preProc = c("center","scale"), metric="ROC", trControl = trainControl(