Save the date! Google I/O returns May 18-20 Register now


The quantitative analysis of a model.

Identify relevant performance metrics and display values. Let’s say you’re interested in displaying the accuracy and false positive rate (FPR) of a cat vs. dog classification model. Assuming you have already computed both metrics, both overall and per-class, you can specify metrics like so:

model_card.quantitative_analysis.performance_metrics = [
  {'type': 'accuracy', 'value': computed_accuracy},
  {'type': 'accuracy', 'value': cat_accuracy, 'slice': 'cat'},
  {'type': 'accuracy', 'value': dog_accuracy, 'slice': 'dog'},
  {'type': 'fpr', 'value': computed_fpr},
  {'type': 'fpr', 'value': cat_fpr, 'slice': 'cat'},
  {'type': 'fpr', 'value': dog_fpr, 'slice': 'dog'},

performance_metrics The performance metrics being reported.
graphics A collection of visualizations of model performance.