confusion_results {fastLogisticRegressionWrap} | R Documentation |
Binary Confusion Table and Errors
Description
Provides a binary confusion table and error metrics
Usage
confusion_results(yhat, ybin, skip_argument_checks = FALSE)
Arguments
yhat |
The binary predictions |
ybin |
The true binary responses |
skip_argument_checks |
If |
Value
A list of raw results
Examples
library(MASS); data(Pima.te)
ybin = as.numeric(Pima.te$type == "Yes")
flr = fast_logistic_regression(
Xmm = model.matrix(~ . - type, Pima.te),
ybin = ybin
)
phat = predict(flr, model.matrix(~ . - type, Pima.te))
confusion_results(phat > 0.5, ybin)
[Package fastLogisticRegressionWrap version 1.2.0 Index]