I use the following code:
fpr, tpr, t = roc_curve(true_categories, predicted_categories)
I know the predicted_categories should be probability or confidence.
But as predict_proba() seems not working for keras Functional API, how should I get the predicted_categories right?
I tried
predicted_categories = tf.argmax(y_pred, axis=1)
and the ROC looks like this:
and this
predicted_categories = = tf.reduce_max(y_pred, axis=1, keepdims=True)
the ROC looks like this:
an ROC with AUC ~50%, which should be 85%
Both of them are not what I expected...
Any suggestion is appreciated!