Created
April 3, 2019 21:21
-
-
Save easadler/0a55e5bfe3ac394b2b4fbdb9c5968c5d to your computer and use it in GitHub Desktop.
Macro-average example with tf.metrics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
aucs = [tf.metrics.auc(labels[:, i], probabilities[:, i], weights=weights[:, i]) | |
for i in range(tasks)] | |
macro_auc = tf.metrics.mean([m[1] for m in aucs], | |
name='macro_auc') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment