deephyper.ensemble.loss.SquaredError#
- class deephyper.ensemble.loss.SquaredError[source]#
Bases:
Loss
The usual square loss
(y_true - y_pred)**2
used to estimateE[Y|X=x]
.Methods
- __call__(y_true: ndarray, y_pred: ndarray | Dict[str, ndarray]) ndarray [source]#
Compute the squared error.
- Parameters:
y_true (np.ndarray) – the true target values.
y_pred (np.ndarray or Dict[str, np.ndarray]) – the predicted target values. If it is a
_Dict[str
"loc". (np.ndarray]_ then it should contain a key)
- Returns:
the loss value with first dimension
n_samples
.- Return type:
np.ndarray