Formuła specyficzności Python

# tn = True Negative
# fp = False Positive
# fn = False Negative
# tp = True Positive

tn, fp, fn, tp = confusion_matrix(y_test,y_pred).ravel()

#Specificity
specificity = tn/(tn+fp)

# Recall
recall = tp/(tp+fn)
NotACoder