I say this as an MLer still struggling to find out what R^2 is, among other things ..
I say this as an MLer still struggling to find out what R^2 is, among other things ..
Here I just coded up a 10-liner for you: https://gist.github.com/4333595
Correlation induces an inner product on the set of zero-mean random variables. The regression coefficient is precisely the projection coefficient <x,y>/<y,y> and R^2 is precisely the Cauchy-Schwarz ratio <x,y>^2 / <x,x><y,y> (i.e. the product of the two projection coefficients between x and y).
It is a theoretically natural measure of linear quality-of-fit. It has the added bonus of being equal to the ratio of modeled variance to total variance (variance being the square-norm of a random variable in the norm induced by the correlation inner product).
It's also very very cheap to compute. Though there are more practically useful measures of "predictive power", like mutual information, R^2 does an admirable job for an O(1)-space and O(num data)-time predictiveness metric.
I suspect that I learned more about R^2 by reading these comments in the order presented (informal, then formal) than I would have had they been reversed.