I am using an rpart classifier in R. The question is - I would want to test the trained classifier on a test data. This is fine - I can use the predict.rpart<
rpart
predict.rpart<
We can simply get F1 value from caret's confusionMatrix function
result <- confusionMatrix(Prediction, Lable) # View confusion matrix overall result # F1 value result$byClass[7]