deephyper.ensemble.loss.NormalNegLogLikelihood

deephyper.ensemble.loss.NormalNegLogLikelihood#

class deephyper.ensemble.loss.NormalNegLogLikelihood[source]#

Bases: Loss

The negative log-likelihood of observed data y_true given predicted parameters of a normal distribution y_pred["loc"], y_pred["scale"].

Methods

__call__(y_true: ndarray, y_pred: ndarray | dict) ndarray[source]#

Compute the loss function.

Parameters:
  • y_true (np.ndarray) – the true target values.

  • y_pred (np.ndarray or dict) – the predicted target values.

Returns:

the loss value with first dimension n_samples.

Return type:

np.ndarray