# tfma.metrics.PlotKey

<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/metrics/metric_types.py#L377-L407) |

A PlotKey is a metric key that uniquely identifies a plot.

Inherits From: [`MetricKey`](https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/metrics/MetricKey)

    tfma.metrics.PlotKey(
        name: str,
        model_name: str = '',
        output_name: str = '',
        sub_key: Optional[https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/metrics/SubKey] = None,
        aggregation_type: Optional[AggregationType] = None,
        example_weighted: Optional[bool] = False,
        is_diff: Optional[bool] = False
    )

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `name` | A `namedtuple` alias for field number 0 |
| `model_name` | A `namedtuple` alias for field number 1 |
| `output_name` | A `namedtuple` alias for field number 2 |
| `sub_key` | A `namedtuple` alias for field number 3 |
| `aggregation_type` | A `namedtuple` alias for field number 4 |
| `example_weighted` | A `namedtuple` alias for field number 5 |
| `is_diff` | A `namedtuple` alias for field number 6 |

<br />

## Methods

### `from_proto`

[View source](https://github.com/tensorflow/model-analysis/blob/v0.46.0/tensorflow_model_analysis/metrics/metric_types.py#L395-L407)

    @staticmethod
    from_proto(
        pb: metrics_for_slice_pb2.PlotKey
    ) -> 'PlotKey'

Configures class from proto.

### `make_baseline_key`

[View source](https://github.com/tensorflow/model-analysis/blob/v0.46.0/tensorflow_model_analysis/metrics/metric_types.py#L365-L366)

    make_baseline_key(
        model_name: str
    ) -> 'MetricKey'

### `make_diff_key`

[View source](https://github.com/tensorflow/model-analysis/blob/v0.46.0/tensorflow_model_analysis/metrics/metric_types.py#L361-L362)

    make_diff_key() -> 'MetricKey'

### `to_proto`

[View source](https://github.com/tensorflow/model-analysis/blob/v0.46.0/tensorflow_model_analysis/metrics/metric_types.py#L380-L393)

    to_proto() -> metrics_for_slice_pb2.PlotKey

Converts key to proto.