explained_variance_score
- sklearn.metrics.explained_variance_score(y_true, y_pred, *, sample_weight=None, multioutput='uniform_average', force_finite=True)
Explained variance regression score function.
Best possible score is 1.0, lower values are worse.
In the particular case when
y_trueis constant, the explained variance score is not finite: it is either (perfect predictions) or (imperfect predictions). To prevent such non-finite numbers to pollute higher-level experiments such as a grid search cross-validation, by default these cases are replaced with 1.0 (perfect predictions) or 0.0 (imperfect predictions) respectively. If is set to , this score falls back on the original definition.