error_metrics¶
-
get_continuous_wasserstein
(y_true, y_pred, x, individual=False)[source]¶ Compute the l2 wasserstein loss
- Parameters
y_true (numpy.ndarray or list) – Ground truth (correct) values.
y_pred (numpy.ndarray or list) – Predicted values, as returned by a regression estimator.
individual (bool) – If True, returns Wasserstein loss along last dimension. If False, returns average Wasserstein loss.
- Returns
loss – The degree to which the samples are correctly predicted.
- Return type
-
get_max_error
(y_true, y_pred)[source]¶ Compute maximum absolute error.
- Parameters
y_true (numpy.ndarray or list) – Ground truth (correct) values.
y_pred (numpy.ndarray or list) – Predicted values, as returned by a regression estimator.
- Returns
loss – The maximum absolute error.
- Return type
-
get_r2
(y_true, y_pred)[source]¶ R2 or the error.
- Parameters
y_true (numpy.ndarray or list) – Ground truth (correct) values
y_pred (numpy.ndarray or list) – Predicted values, as returned by a regression estimator.
- Returns
loss – R2 value.
- Return type
-
get_rmse
(y_true, y_pred)[source]¶ Compute maximum absolute error.
- Parameters
y_true (numpy.ndarray or list) – Ground truth (correct) values.
y_pred (numpy.ndarray or list) – Predicted values, as returned by a regression estimator.
- Returns
loss – The maximum absolute error times the sign of the error.
- Return type
-
get_wasserstein_loss
(y_true, y_pred, individual=False)[source]¶ Compute the l2 wasserstein loss
- Parameters
y_true (numpy.ndarray or list) – Ground truth (correct) values.
y_pred (numpy.ndarray or list) – Predicted values, as returned by a regression estimator.
individual (bool) – If True, returns Wasserstein loss along first dimension. If False, returns average Wasserstein loss.
- Returns
loss – The degree to which the samples are correctly predicted.
- Return type