The documentation for tf.keras.metrics.AUC
says that when estimating the AUC for multi-class data (i.e., multi_label=False
),
the data should be flattened into a single label before AUC computation.
What exactly does this mean?
Also, if you have multi-class data, it's possible to train a model without pre-flatting the labels, e.g., for a given model
, you can run
model.compile(loss="binary_crossentropy", metrics=[tf.keras.metrics.AUC()])
and the model will calculate an AUC for you for each epoch. I know using binary cross-entropy loss in a multi-class problem tells tensorflow to setup a multi-label classification problem (see here), but I haven't told tf.keras.metrics.AUC
that the data is multilabel. So what exactly is it calculating in this case?