Confusion Matrix for Multi-class variables using cross validation.

Hi, my dataset includes multi-class variables (11 different variables). All of the columns are numeric except the last column which is the label ( Last Column Name = Movement, 11 different types, Type = text). I want to try different classification algorithms on my datasets using the cross-validation method, and I also want to present different measuring performance such as accuracy, f1, g-measure, recall, and etc. So far, I have used the Caret package but it just shows the Accuracy and Kappa as the result of each algorithm. I wanted to know how can I present other performance measurements while I am using a cross-validation method and my database includes 11 different class variables. I know that the confusion matrix function in R contains most of the performance function that I need but I do not work on my database and it just shows the accuracy. Besides, I need to mention that I have used the Caret package because I need various classification algorithms and the Caret package does include most of them.

library(caret)
library(rpart)

train <- createFolds(Database$Movement, k = 10)
DecisionTree <- Database%>% train(Movement ~ .,
  method = "rpart",
  data = .,
  tuneLength = 5,
    trControl = trainControl(method = "cv"))
DecisionTree 
confusionMatrix(DecisionTree)

See Section 5.5.5 of the documentation.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.