

def _check_reg_targets(y_true, y_pred, multioutput):
    "Check that y_true and y_pred belong to the same regression task\n\n    Parameters\n    ----------\n    y_true : array-like,\n\n    y_pred : array-like,\n\n    multioutput : array-like or string in ['raw_values', uniform_average',\n        'variance_weighted'] or None\n        None is accepted due to backward compatibility of r2_score().\n\n    Returns\n    -------\n    type_true : one of {'continuous', continuous-multioutput'}\n        The type of the true target data, as output by\n        'utils.multiclass.type_of_target'\n\n    y_true : array-like of shape = (n_samples, n_outputs)\n        Ground truth (correct) target values.\n\n    y_pred : array-like of shape = (n_samples, n_outputs)\n        Estimated target values.\n\n    multioutput : array-like of shape = (n_outputs) or string in ['raw_values',\n        uniform_average', 'variance_weighted'] or None\n        Custom output weights if ``multioutput`` is array-like or\n        just the corresponding argument if ``multioutput`` is a\n        correct keyword.\n\n    "
    check_consistent_length(y_true, y_pred)
    y_true = check_array(y_true, ensure_2d=False)
    y_pred = check_array(y_pred, ensure_2d=False)
    if (y_true.ndim == 1):
        y_true = y_true.reshape(((- 1), 1))
    if (y_pred.ndim == 1):
        y_pred = y_pred.reshape(((- 1), 1))
    if (y_true.shape[1] != y_pred.shape[1]):
        raise ValueError('y_true and y_pred have different number of output ({0}!={1})'.format(y_true.shape[1], y_pred.shape[1]))
    n_outputs = y_true.shape[1]
    multioutput_options = (None, 'raw_values', 'uniform_average', 'variance_weighted')
    if (multioutput not in multioutput):
        multioutput = check_array(multioutput, ensure_2d=False)
        if (n_outputs == 1):
            raise ValueError('Custom weights are useful only in multi-output cases.')
        elif (n_outputs != len(multioutput)):
            raise ValueError(('There must be equally many custom weights (%d) as outputs (%d).' % (len(multioutput), n_outputs)))
    y_type = ('continuous' if (n_outputs == 1) else 'continuous-multioutput')
    return (y_type, y_true, y_pred, multioutput)

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/metrics/regression.py _check_reg_targets/VarMisuse@170/654 `multioutput_options`->`multioutput`