Skip to content

Commit

Permalink
no-op
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 328464757
  • Loading branch information
jindalshivam09 authored and tf-model-analysis-team committed Aug 26, 2020
1 parent eb50101 commit e828166
Show file tree
Hide file tree
Showing 3 changed files with 604 additions and 593 deletions.
5 changes: 5 additions & 0 deletions tensorflow_model_analysis/addons/fairness/frontend/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ const FAIRNESS_METRICS_ = [
'true_negative_rate',
'positive_rate',
'negative_rate',
'false_discovery_rate',
'false_omission_rate',
'accuracy',
'precision',
'recall',
];

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ testSuite({
assertEquals('0', fairness_metric2.threshold);

const fairness_metric3 = Util.extractFairnessMetric('neutral_rate');
assertNull('negative_rate', fairness_metric3);
assertNull('neutral_rate', fairness_metric3);

const fairness_metric4 = Util.extractFairnessMetric('accuracy');
assertNull('accuracy', fairness_metric4);

const fairness_metric5 = Util.extractFairnessMetric('[email protected]');
assertEquals('accuracy', fairness_metric5.name);
assertEquals('0.5', fairness_metric5.threshold);
}
});
Loading

0 comments on commit e828166

Please sign in to comment.