blr_confusion_matrix: Confusion matrix

Description Usage Arguments Value See Also Examples

View source: R/blr-model-validation.R

Description

Confusion matrix and statistics.

Usage

1
2
3
4
blr_confusion_matrix(model, cutoff = 0.5, data = NULL, ...)

## Default S3 method:
blr_confusion_matrix(model, cutoff = 0.5, data = NULL, ...)

Arguments

model

An object of class glm.

cutoff

Cutoff for classification.

data

A tibble or a data.frame.

...

Other arguments.

Value

Confusion matix.

See Also

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

Examples

1
2
3
4
model <- glm(honcomp ~ female + read + science, data = hsb2,
            family = binomial(link = 'logit'))

blr_confusion_matrix(model, cutoff = 0.4)

blorr documentation built on July 2, 2020, 2:15 a.m.