AbstractLoss

class pmrf.losses.AbstractLoss

Bases: Module

Abstract base class for frequentist loss functions.

A loss function accepts (y_true, y_pred) and returns a loss value representing the discrepancy between the true data and the model prediction.

abstractmethod __call__(y_true: Array, y_pred: Array, **kwargs) Array

Compute the loss between true data and model predictions.

Parameters:
  • y_true (jnp.ndarray) – The observed ground-truth data.

  • y_pred (jnp.ndarray) – The model’s predicted data.

  • **kwargs (dict) – Additional keyword arguments for loss computation.

Returns:

The calculated loss value.

Return type:

jnp.ndarray