deephyper.ensemble.loss.Loss#
- class deephyper.ensemble.loss.Loss[source]#
Bases:
ABC
Base class that represents the loss function of an ensemble.
Losses represent functions that should be minimized.
Methods
- abstract __call__(y_true: ndarray, y_pred: ndarray | Dict[str, ndarray]) ndarray [source]#
Compute the loss function.
- Parameters:
y_true (np.ndarray) – the true target values.
y_pred (np.ndarray or Dict[str, np.ndarray]) – the predicted target values.
- Returns:
the loss value with first dimension
n_samples
.- Return type:
np.ndarray