Generate a confusion matrix for svm in e1071 for CV results
问题 I did a classification with svm using e1071 . The goal is to predict type through all other variables in dtm . dtm[140:145] %>% str() 'data.frame': 385 obs. of 6 variables: $ think : num 0 0 0 0 0 0 0 0 0 0 ... $ actually: num 0 0 0 0 0 0 0 0 0 0 ... $ comes : num 0 0 0 0 0 0 0 0 0 0 ... $ able : num 0 0 0 0 0 0 0 0 0 0 ... $ hours : num 0 0 0 0 0 0 0 0 0 0 ... $ type : Factor w/ 4 levels "-1","0","1","9": 4 3 3 3 4 1 4 4 4 3 ... To train/test the model, I used the 10-fold-cross-validation.