I am currently working on titanic problem of kaggle while creating a classification model I am getting the error
C5.0 models require a factor outcomebut I am not able to resolve it.
test$Survived<-NA #both the train and test data set will have same factor levels.
combinedData <- rbind(train,test)
new_train <- combinedData[1:891,]
new_test <- combinedData[892:1309,]
m1 <- C5.0(new_train[,-2],new_train[,2])
Error in C5.0.default(new_train[, -2], new_train[, 2]) :
C5.0 models require a factor outcome