Calculates a cross-tabulation of observed and predicted classes with associated statistics for the optimal cutoff (i.e. the cutoff that makes the best trade-off between sensitivity and specificity)

performances(score, Y)

Arguments

score

probabilistic output

Y

a vector containing the true class labels. Must have the same dimensions as ’score’. It must be a factor with levels "0" and "1"

Value

resultats a list with elements: - table: the confusion matrix (i.e. a cross-tabulation of observed and predicted classes) for the optimal cutoff - conc: the accuracy rate for the optimal cutoff - sens: the sensitivy rate for the optimal cutoff - spe: the specificity rate for the optimal cutoff - auc: the auc for the optimal cutoff - cutoff: the optimal cutoff

Details

As the function xtab_function, this function deals with the case where a model assigns all observation to the same class (0 or 1)