I'm trying to test models performances using the caret package.I got the results per each of the models but I wouldlike to get a list that will contain the accuracy and ROC of all the models together.How can I do it? Here is my toy data and two models:
dat <- read.table(text = " target birds wolfs snakes
0 3 9 7
1 3 8 4
1 1 2 8
0 1 2 3
0 1 8 3
1 6 1 2
0 6 7 1
1 6 1 5
0 5 9 7
1 3 8 7
1 4 2 7
0 1 2 3
0 7 6 3
1 6 1 1
0 6 3 9
1 6 1 1 ",header = TRUE)
Here are the two models:
svmRadial <- train(target ~ ., data = dat, method='svmRadial')
glm <- train(target ~ ., data = dat, method='glm')
I would like to get such a table an an output:
ModelName Accuracy ROC
svmRadial 0.95 0.74
glm 0.93 0.7