Confusion matrix and statistics.
blr_confusion_matrix(model, cutoff = 0.5, data = NULL, ...) # S3 method for default blr_confusion_matrix(model, cutoff = 0.5, data = NULL, ...)
model | An object of class |
---|---|
cutoff | Cutoff for classification. |
data | A |
... | Other arguments. |
Confusion matix.
Other model validation techniques:
blr_decile_capture_rate()
,
blr_decile_lift_chart()
,
blr_gains_table()
,
blr_gini_index()
,
blr_ks_chart()
,
blr_lorenz_curve()
,
blr_roc_curve()
,
blr_test_hosmer_lemeshow()
model <- glm(honcomp ~ female + read + science, data = hsb2, family = binomial(link = 'logit')) blr_confusion_matrix(model, cutoff = 0.4) #> Confusion Matrix and Statistics #> #> Reference #> Prediction 0 1 #> 0 125 16 #> 1 22 37 #> #> #> Accuracy : 0.8100 #> No Information Rate : 0.7350 #> #> Kappa : 0.5293 #> #> McNemars's Test P-Value : 0.4173 #> #> Sensitivity : 0.6981 #> Specificity : 0.8503 #> Pos Pred Value : 0.6271 #> Neg Pred Value : 0.8865 #> Prevalence : 0.2650 #> Detection Rate : 0.1850 #> Detection Prevalence : 0.2950 #> Balanced Accuracy : 0.7742 #> Precision : 0.6271 #> Recall : 0.6981 #> #> 'Positive' Class : 1