![]() |
The quantitative analysis of a model.
model_card_toolkit.QuantitativeAnalysis(
performance_metrics: List[model_card_toolkit.PerformanceMetric
] = <factory>,
graphics: model_card_toolkit.Graphics
= <factory>
)
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'},
]
Attributes | |
---|---|
performance_metrics
|
The performance metrics being reported. |
graphics
|
A collection of visualizations of model performance. |
Methods
__eq__
__eq__(
other
)