Internal change.

PiperOrigin-RevId: 323529635
This commit is contained in:
A. Unique TensorFlower 2020-07-28 01:35:46 -07:00 committed by Steve Chien
parent f318fbb140
commit dcbfaa3f5e

View file

@ -67,7 +67,7 @@ class RocCurveTest(absltest.TestCase):
def test_auc_random_classifier(self): def test_auc_random_classifier(self):
roc = RocCurve( roc = RocCurve(
tpr=np.array([0.0, 0.5, 1.0]), tpr=np.array([0.0, 0.5, 1.0]),
fpr=np.array([1.0, 0.5, 0.0]), fpr=np.array([0.0, 0.5, 1.0]),
thresholds=np.array([0, 1, 2])) thresholds=np.array([0, 1, 2]))
self.assertEqual(roc.get_auc(), 0.5) self.assertEqual(roc.get_auc(), 0.5)
@ -83,7 +83,7 @@ class RocCurveTest(absltest.TestCase):
def test_attacker_advantage_random_classifier(self): def test_attacker_advantage_random_classifier(self):
roc = RocCurve( roc = RocCurve(
tpr=np.array([0.0, 0.5, 1.0]), tpr=np.array([0.0, 0.5, 1.0]),
fpr=np.array([1.0, 0.5, 0.0]), fpr=np.array([0.0, 0.5, 1.0]),
thresholds=np.array([0, 1, 2])) thresholds=np.array([0, 1, 2]))
self.assertEqual(roc.get_attacker_advantage(), 0.0) self.assertEqual(roc.get_attacker_advantage(), 0.0)