![]() |
A SubKey identifies a sub-types of metrics and plots.
tfma.metrics.SubKey(
class_id: Optional[int] = None,
k: Optional[int] = None,
top_k: Optional[int] = None
)
Only one of class_id, k, or top_k can be set at a time.
Attributes | |
---|---|
class_id
|
Used with multi-class metrics to identify a specific class ID. |
k
|
Used with multi-class metrics to identify the kth predicted value. |
top_k
|
Used with multi-class and ranking metrics to identify top-k predicted values. |
Methods
from_proto
@staticmethod
from_proto( pb: metrics_for_slice_pb2.SubKey ) -> Optional['SubKey']
Creates class from proto.
to_proto
to_proto() -> metrics_for_slice_pb2.SubKey
Converts key to proto.