conn2res.performance.r2_score

conn2res.performance.r2_score(y_true, y_pred, sample_weight=None, multioutput='uniform_average', **kwargs)[source]

Coefficient of determination of the regression R^2.

Parameters:
  • y_true (numpy.ndarray) – Ground truth target values.

  • y_pred (numpy.ndarray) – Predicted target values.

  • sample_weight (numpy.ndarray) – Sample weights.

  • multioutput (str) –

    Defines aggregating of multiple output scores:

    ‘raw_values’ : Returns a full set of scores in case of multioutput input.

    ‘uniform_average’ : Scores of all outputs are averaged with uniform weight.

    ‘variance_weighted’ : Scores of all outputs are averaged, weighted by the variances of each individual output.

Returns:

score – A floating point value or an array of floating point values, one for each individual target.

Return type:

float or ndarray of floats.