whylogs.experimental.extras.embedding_metric
#
Module Contents#
Classes#
Generic enumeration. |
|
The rows of references are the reference vectors. A shape of (1, 1) indicates |
|
Attributes#
- whylogs.experimental.extras.embedding_metric.logger#
- class whylogs.experimental.extras.embedding_metric.DistanceFunction#
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- euclidean#
- cosine#
- name()#
The name of the Enum member.
- value()#
The value of the Enum member.
- class whylogs.experimental.extras.embedding_metric.EmbeddingConfig#
Bases:
whylogs.core.metrics.metrics.MetricConfig
The rows of references are the reference vectors. A shape of (1, 1) indicates there’s no reference matrix and the metric will not be updatable. It should still be mergeable with compatible metrics (details of compatability TBD). The rows must be in the same order as labels. If labels are not provided, “0” … “n” will be used, where n is the number of rows in the references matrix.
- references: whylogs.core.stubs.np.ndarray#
- distance_fn: DistanceFunction#
- class whylogs.experimental.extras.embedding_metric.EmbeddingMetric#
Bases:
whylogs.core.metrics.multimetric.MultiMetric
- distance_fn: DistanceFunction#
- merge(other: EmbeddingMetric) EmbeddingMetric #
- Parameters
other (EmbeddingMetric) –
- Return type
- to_protobuf() whylogs.core.proto.MetricMessage #
- Return type
whylogs.core.proto.MetricMessage
- columnar_update(data: whylogs.core.preprocessing.PreprocessedColumn) whylogs.core.metrics.metrics.OperationResult #
- Parameters
- Return type
- classmethod from_protobuf(msg: whylogs.core.proto.MetricMessage) EmbeddingMetric #
- Parameters
msg (whylogs.core.proto.MetricMessage) –
- Return type
- classmethod zero(cfg: Optional[EmbeddingConfig] = None) EmbeddingMetric #
- Parameters
cfg (Optional[EmbeddingConfig]) –
- Return type