# tfma.MetricsSpec

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/model-analysis/blob/v0.46.0/tensorflow_model_analysis/proto/config.proto) |

A ProtocolMessage

### Used in the notebooks

| Used in the tutorials |
|---|
| - [Better ML Engineering with ML Metadata](https://www.tensorflow.org/tfx/tutorials/mlmd/mlmd_tutorial) - [TFX Estimator Component Tutorial](https://www.tensorflow.org/tfx/tutorials/tfx/components) - [TFX Keras Component Tutorial](https://www.tensorflow.org/tfx/tutorials/tfx/components_keras) - [Model analysis using TFX Pipeline and TensorFlow Model Analysis](https://www.tensorflow.org/tfx/tutorials/tfx/penguin_tfma) |

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `aggregate` | `AggregationOptions aggregate` |
| `binarize` | `BinarizationOptions binarize` |
| `cross_slice_thresholds` | `repeated CrossSliceThresholdsEntry cross_slice_thresholds` |
| `example_weights` | `ExampleWeightOptions example_weights` |
| `metrics` | `repeated MetricConfig metrics` |
| `model_names` | `repeated string model_names` |
| `output_names` | `repeated string output_names` |
| `output_weights` | `repeated OutputWeightsEntry output_weights` |
| `per_slice_thresholds` | `repeated PerSliceThresholdsEntry per_slice_thresholds` |
| `query_key` | `string query_key` |
| `thresholds` | `repeated ThresholdsEntry thresholds` |

<br />

## Child Classes

[`class CrossSliceThresholdsEntry`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/MetricsSpec/CrossSliceThresholdsEntry)

[`class OutputWeightsEntry`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/MetricsSpec/OutputWeightsEntry)

[`class PerSliceThresholdsEntry`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/MetricsSpec/PerSliceThresholdsEntry)

[`class ThresholdsEntry`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/MetricsSpec/ThresholdsEntry)