Summary method for the confusion matrix

# S3 method for confusion
summary(object, dec = 3, ...)

Arguments

object

Return value from confusion

dec

Number of decimals to show

...

further arguments passed to or from other methods

Details

See https://radiant-rstats.github.io/docs/model/evalbin.html for an example in Radiant

See also

confusion to generate results

plot.confusion to visualize result

Examples

data.frame(buy = dvd$buy, pred1 = runif(20000), pred2 = ifelse(dvd$buy == "yes", 1, 0)) %>% confusion(c("pred1", "pred2"), "buy") %>% summary()
#> Confusion matrix #> Data : . #> Results for: All #> Predictors : pred1, pred2 #> Response : buy #> Level : yes in buy #> Cost:Margin: 1 : 2 #> #> Type Predictor TP FP TN FN total TPR TNR precision Fscore #> All pred1 2,703 7,388 7,366 2,543 20,000 0.515 0.499 0.268 0.352 #> All pred2 5,246 0 14,754 0 20,000 1.000 1.000 1.000 1.000 #> #> Type Predictor accuracy kappa profit index ROME contact AUC #> All pred1 0.503 0.011 -4,685 -0.893 -0.464 0.505 0.508 #> All pred2 1.000 1.000 5,246 1.000 1.000 0.262 1.000