Skip to content
Last Dictionary

coefficient of determination

nounAlso: R², R-squared, R2, adjusted R², adjusted R-squared

In plain wordsA score for numerical predictions showing how much of the variation in the true values a model accounts for, compared with always guessing the average: 1 is perfect, 0 is no better than the average.

  1. A measure, written R², of how much of the variance of a target variable a regression model explains. It is 1 minus the ratio of the model's residual sum of squares to the total sum of squares around the mean, equivalently 1 minus the mean squared errormean squared error, n.: A way of scoring numerical predictions: square each prediction's error, then average them, so big misses count much more than small ones. Lower is better. divided by the target's variance. A value of 1 means perfect predictions and 0 means the model does no better than always predicting the mean; on held-out data, for models fitted without an intercept, or for nonlinear fits, R² can be negative, meaning the model is worse than the mean. For ordinary least squaresordinary least squares, n.: The standard way to fit a line through data: choose the line that makes the total of the squared vertical distances from the points to the line as small as possible. with an intercept, evaluated on its own training data, it equals the squared correlation between predictions and targets. Because training R² never falls when predictors are added, adjusted R² penalizes the number of predictors. R² is scale-free and widely reported, but it depends on how varied the evaluation sample is, says nothing about bias or misspecification, and a high value implies neither causation nor useful accuracy.

    The model explains 64% of the variance in house prices (R² = 0.64 on the test set).

R2=1−∑i(yi−y^i)2∑i(yi−yˉ)2R^2 = 1 - \frac{\sum_i (y_i - \hat{y}_i)^2}{\sum_i (y_i - \bar{y})^2}

Origin

Usually credited to the geneticist Sewall Wright, who used it in his 1921 paper 'Correlation and Causation', a founding text of path analysis. Mordecai Ezekiel proposed the most widely used adjusted version in his 1930 book Methods of Correlation Analysis.

Usage note

Not interchangeable with the squared correlation r² in general: the two coincide only for least-squares fits with an intercept, evaluated on the data used for fitting.

Related

See also
  • mean squared errormean squared error, n.: A way of scoring numerical predictions: square each prediction's error, then average them, so big misses count much more than small ones. Lower is better.
  • regressionregression, n.: Predicting a number rather than a category — a house's price, tomorrow's temperature, a patient's blood pressure — by learning from past examples where the answer is known.
  • linear regressionlinear regression, n.: Fitting a straight line (or flat surface) through data points to predict one number from others — say, a house's price from its floor area — choosing the line that keeps prediction errors smallest.
  • correlationcorrelation, n.: A measure of how closely two quantities move together, from −1 (one rises as the other falls) through 0 (no straight-line link) to +1 (they rise together). It does not show that one causes the other.
  • variancevariance, n.: A number that grows the more widely something's possible values scatter away from its average, and is zero if it never varies. Its square root, the standard deviation, uses the same units as the values themselves.
  • overfittingoverfitting, n.: When a model learns its training examples too well — quirks and noise included — so it does great on data it has seen but poorly on anything new, like a student who memorizes answers without understanding.

Sources

  1. Wright, S. (1921). Correlation and Causation. Journal of Agricultural Research 20(7).
  2. Ezekiel, M. (1930). Methods of Correlation Analysis. New York: Wiley.

Mentioned in

regressionregression, n.: Predicting a number rather than a category — a house's price, tomorrow's temperature, a patient's blood pressure — by learning from past examples where the answer is known., mean absolute errormean absolute error, n.: A way of scoring numerical predictions: average how far off each prediction is, ignoring direction, so the score reads as 'typically off by this much'. Lower is better., mean squared errormean squared error, n.: A way of scoring numerical predictions: square each prediction's error, then average them, so big misses count much more than small ones. Lower is better.