你遇到下面的问题了吗?,
> rfFit <- train(CARAVAN~.,data = trainingInd,
+ method = 'rf',
+ trControl = ctrl,
+ ntree = 1500,
+ tuneLength =5,
+ metric = 'ROC')
Error: At least one of the class levels is not a valid R variable name; This will cause errors when class probabilities are generated because the variables names will be converted to X2, X1 . Please use factor levels that can be used as valid R variable names (see ?make.names for help).