confusion_results {fastLogisticRegressionWrap} | R Documentation |
Provides a binary confusion table and error metrics
confusion_results(yhat, ybin, skip_argument_checks = FALSE)
yhat |
The binary predictions |
ybin |
The true binary responses |
skip_argument_checks |
If |
A list of raw results
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)