perf_df {ezplot} | R Documentation |
perf_df
Description
shows classification performance statistics as a table
Usage
perf_df(fitted, actual, quantiles = NULL)
Arguments
fitted |
A character value. Evaluates to a numeric column. |
actual |
A character value. Evaluates to a logical or binary column. |
quantiles |
Number of quantiles to show. If |
Value
A data.frame summarizing binary classification performance:
quantile: fitted value quantile (only if
!is.null(quantile)
cutoff: fitted value cutoff
fp: false positives
tp: true positives
tn: true negatives
fn: false negatives
pp: positive predictions
np: negative predictions
ipp: group positive predictions
ifp: group false positives
itp: group true positives
rpp: rate of positive predictions
acc: accuracy
fpr: false positive rate
tpr: true positive rate
fnr: false negative rate
tnr: true negative rate
prec: precision
clift: lift
ilift: group lift
f1: f1 measure
ks: Kolmogorov-Smirnov statistic
auc: area under ROC curve
aucpr: area under PR curve
Examples
perf_df(mtcars$mpg, mtcars$am)
perf_df(mtcars$mpg, mtcars$am, quantiles = 4)
perf_df(mtcars$mpg, mtcars$am, quantiles = 8)
perf_df(mtcars$mpg, mtcars$am, quantiles = 10)
perf_df(mtcars$wt, mtcars$am==0)