crested.tl.losses.PoissonLoss#
- class crested.tl.losses.PoissonLoss(log_transform=True, eps=1e-07, reduction='sum_over_batch_size', name='PoissonLoss')#
Custom Poisson loss for count data with optional log(x + 1) transformation.
This loss function computes the Poisson loss, optionally applying log(x + 1) transformations to predictions and/or targets to ensure non-negativity.
- Parameters:
Attributes table#
Methods table#
|
Compute the Poisson loss. |
|
|
Return the configuration of the loss function. |
Attributes#
- PoissonLoss.dtype#
Methods#
- PoissonLoss.call(y_true, y_pred)#
Compute the Poisson loss.
- Parameters:
y_true – True target values (counts or log(x + 1)-transformed counts).
y_pred – Predicted values (counts or log(x + 1)-transformed counts).
- Returns:
The Poisson loss value for each sample.
- classmethod PoissonLoss.from_config(config)#
- PoissonLoss.get_config()#
Return the configuration of the loss function.