Created
July 10, 2020 08:42
-
-
Save ntakouris/c2e9bfec58299cb0386b7d2ddd627bac to your computer and use it in GitHub Desktop.
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_model_analysis as tfma | |
# model.compile(..., metrics=[...]), etc) will be computed | |
# automatically. | |
metrics=[ | |
tfma.MetricConfig(class_name='ExampleCount') | |
], | |
# To add validation thresholds for metrics saved with the model, | |
# add them keyed by metric name to the thresholds map. | |
thresholds = { | |
"binary_accuracy": tfma.MetricThreshold( | |
value_threshold=tfma.GenericValueThreshold( | |
lower_bound={'value': 0.5}), | |
change_threshold=tfma.GenericChangeThreshold( | |
direction=tfma.MetricDirection.HIGHER_IS_BETTER, | |
absolute={'value': -1e-10})) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment