0
$\begingroup$

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"))

confusionMatrix(DecisionTree)

$\endgroup$
0
$\begingroup$

You should be able to change the objective function via argument to train.

Second, if you are looking for training performance, look at the function ‘resamples’

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.