def specificity(classify=lambda document:False, documents=[]):
    TP, TN, FP, FN = confusion_matrix(classify, documents)
    return float(TN) / ((TN + FP) or 1)
Returns the percentage of negative cases correctly classified as negative.
dataset/ETHPy150Open clips/pattern/pattern/metrics.py/specificity