R - factor examcard has new levels
问题 I built a classification model in R using C5.0 given below: library(C50) library(caret) a = read.csv("All_SRN.csv") set.seed(123) inTrain <- createDataPartition(a$anatomy, p = .70, list = FALSE) training <- a[ inTrain,] test <- a[-inTrain,] Tree <- C5.0(anatomy ~ ., data = training, trControl = trainControl(method = "repeatedcv", repeats = 10, classProb = TRUE)) TreePred <- predict(Tree, test) The training set has features like - examcard, coil_used, anatomy_region, bodypart_anatomy and