

def mean_absolute_error(y_true, y_pred, sample_weight=None, multioutput='uniform_average'):
    "Mean absolute error regression loss\n\n    Read more in the :ref:`User Guide <mean_absolute_error>`.\n\n    Parameters\n    ----------\n    y_true : array-like of shape = (n_samples) or (n_samples, n_outputs)\n        Ground truth (correct) target values.\n\n    y_pred : array-like of shape = (n_samples) or (n_samples, n_outputs)\n        Estimated target values.\n\n    sample_weight : array-like of shape = (n_samples), optional\n        Sample weights.\n\n    multioutput : string in ['raw_values', 'uniform_average']\n        or array-like of shape (n_outputs)\n        Defines aggregating of multiple output values.\n        Array-like value defines weights used to average errors.\n\n        'raw_values' :\n            Returns a full set of errors in case of multioutput input.\n\n        'uniform_average' :\n            Errors of all outputs are averaged with uniform weight.\n\n\n    Returns\n    -------\n    loss : float or ndarray of floats\n        If multioutput is 'raw_values', then mean absolute error is returned\n        for each output separately.\n        If multioutput is 'uniform_average' or an ndarray of weights, then the\n        weighted average of all output errors is returned.\n\n        MAE output is non-negative floating point. The best value is 0.0.\n\n    Examples\n    --------\n    >>> from sklearn.metrics import mean_absolute_error\n    >>> y_true = [3, -0.5, 2, 7]\n    >>> y_pred = [2.5, 0.0, 2, 8]\n    >>> mean_absolute_error(y_true, y_pred)\n    0.5\n    >>> y_true = [[0.5, 1], [-1, 1], [7, -6]]\n    >>> y_pred = [[0, 2], [-1, 2], [8, -5]]\n    >>> mean_absolute_error(y_true, y_pred)\n    0.75\n    >>> mean_absolute_error(y_true, y_pred, multioutput='raw_values')\n    array([ 0.5,  1. ])\n    >>> mean_absolute_error(y_true, y_pred, multioutput=[0.3, 0.7])\n    ... # doctest: +ELLIPSIS\n    0.849...\n    "
    (y_type, y_true, y_pred, multioutput) = _check_reg_targets(y_true, y_pred, multioutput)
    output_errors = np.average(np.abs((y_pred - y_true)), weights=sample_weight, axis=0)
    if isinstance(output_errors, string_types):
        if (multioutput == 'raw_values'):
            return output_errors
        elif (multioutput == 'uniform_average'):
            multioutput = None
    return np.average(output_errors, weights=multioutput)

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/metrics/regression.py mean_absolute_error/VarMisuse@70/871 `multioutput`->`output_errors`