multioutput_root_mean_squared_error#

skfp.metrics.multioutput_root_mean_squared_error(y_true: ndarray | list, y_pred: ndarray | list, *args, **kwargs) float#

Root mean squared error (RMSE) for multioutput problems.

Returns the average value over all tasks. Missing values in target labels are ignored. Also supports single-task evaluation.

Any additional arguments are passed to the underlying root_mean_squared_error function, see scikit-learn documentation for more information.

Parameters:
  • y_true (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Ground truth (correct) target values.

  • y_pred (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Estimated target values.

  • *args – Any additional parameters for the underlying scikit-learn metric function.

  • **kwargs – Any additional parameters for the underlying scikit-learn metric function.

Returns:

score – Average RMSE value over all tasks.

Return type:

float

Examples

>>> import numpy as np
>>> from skfp.metrics import multioutput_root_mean_squared_error
>>> y_true = [[0.5, 1], [-1, 1], [7, -6]]
>>> y_pred = [[0, 2], [-1, 2], [8, -5]]
>>> multioutput_root_mean_squared_error(y_true, y_pred)
0.822...
>>> y_true = [[0.5, 1], [-1, 1], [np.nan, 10], [-10, np.nan]]
>>> y_pred = [[0, 2], [-1, 2], [-3, 8], [-10, 5]]
>>> multioutput_root_mean_squared_error(y_true, y_pred)
0.851...