This project has moved and is read-only. For the latest updates, please go here.

How to get R-square value in Polynomial Regression ?

Jul 29, 2015 at 7:17 AM
Edited Jul 29, 2015 at 7:18 AM
First of all, Thanks for this good library.

I'm using two Regressions of BivariateSample such as Linear and polynomial.
I can't find where i find r-square value in FitResult class.

In case of Linear, I use BivariateSample.CorrelationCoefficient * BivariateSample.CorrelationCoefficient.
In case of Polynomial, Any other ways of get r-square value?
Dec 24, 2016 at 10:20 AM
You can get r for a BivariateSample using PearsonRTest().Statistic. Its square is the r^2 for a linear fit, which you can also get by summing the squares of the residuals dividing by n-2. The r^2 for other fits is defined by analogy and can be computed analogously: sum the squares of the residuals and divide by n minus the number of fit parameters.

In future releases, we will make it easier to get to this information.