statsmodels.nonparametric.kernel_regression.KernelReg.r_squared
-
KernelReg.r_squared()[source] -
Returns the R-Squared for the nonparametric regression.
Notes
For more details see p.45 in [2] The R-Squared is calculated by:
![R^{2}=\frac{\left[\sum_{i=1}^{n}(Y_{i}-\bar{y})(\hat{Y_{i}}-\bar{y}\right]^{2}}{\sum_{i=1}^{n}(Y_{i}-\bar{y})^{2}\sum_{i=1}^{n}(\hat{Y_{i}}-\bar{y})^{2}},](http://statsmodels.sourceforge.net/stable/_images/math/47acf165ee5ff9b17dfd3dfdc32c49fce0185f15.png)
where
is the mean calculated in fitat the exog points.
Please login to continue.