It has the ROC curves for the two classes and the macro average, which make sense (they are all similar). However, the micro average has a much bigger AUC score, which makes no sense to me. Shouldn't the micro average be about the same as the macro average? I started working on some code to test this out, but haven't finished it (here it is in case it helps:)
from sklearn.metrics import auc, roc_auc_score, roc_curve
roc_auc_score(y_test, lr_model.predict_proba(x_test)[:, 1])
# predictions for class 0 and 1, and ground truth
preds_0 = [0.2, 0.3, 0.7, 0.2]
preds_1 = [0.8, 0.7, 0.3, 0.8]
targets = [0, 1, 0, 0]
roc_auc_score(targets, preds_1)
roc_auc_score(targets, preds_0)
# returns tpr, fpr, thresholds
# tpr = TP/(TP+FN)
# fpr = FP/(FP+TN)
p1_roc = roc_curve(targets, preds_1)
p2_roc = roc_curve(targets, preds_0)
all_thresholds = np.hstack((p1_roc[2], p2_roc[2]))
# sort greatest to least
all_thresholds.sort()
all_thresholds = all_thresholds[::-1]
micro_tpr = []
micro_fpr = []
for t in all_thresholds:
p0_preds = preds_0 < t
p1_preds = preds_1 >= t
micro_tpr.append()
macro_avg_tpr = np.vstack((p1_roc[0], p2_roc[0])).mean(axis=0)