Metric
minnt.Metric
An abstract metric interface.
update
abstractmethod
update(
y: TensorOrTensors,
y_true: TensorOrTensors | None = None,
sample_weights: TensorOrTensors | None = None,
) -> None
Update the internal state of the metric with new predictions and possibly gold targets.
Optional sample weights might be provided if supported by the metric.
Parameters:
-
y(TensorOrTensors) –The predicted outputs.
-
y_true(TensorOrTensors | None, default:None) –Optional ground-truth targets.
-
sample_weights(TensorOrTensors | None, default:None) –Optional sample weights.
compute
abstractmethod
compute() -> Tensor
Compute the accumulated metric value.
Returns:
-
Tensor–A (usually scalar) tensor representing the accumulated metric value.
reset
abstractmethod
reset() -> None
Reset the internal state of the metric.