I am trying a classification with Random Forest in R I have a training data set that has a complexityFlag that is 1 or 0 and I am training my model on the data set using Random Forest:
model1 <- randomForest(as.factor(ComplexityFlag) ~ ContractTypeCode + IndustryLevel2Description + ClaimantAgeAtDisability + Sex, data = data, ntree = 200, importance=TRUE)
Then I want run the model against my test data set, but my test data set does not have the ComplexityFlag. I want the model to predict the ComplexityFlag like so :
test$ComplexityFlag <- as.data.frame(predict(model1, newdata = test, type = "class"))
how can i calculate the ROC am I using the correct approach