For Linear Regression with 1 Variable and an Intercept, I can compute the RSquare as -
R^2 = (np.sum(((x - np.mean(x)) / np.std(x, ddof=1)) * ((y - np.mean(y)) / np.std(y, ddof=1))) / (len(x) - 1)) ** 2
How do I compute R Square for Linear Regression with 1 Variable and without an intercept, and without having to deal with statsmodels.api
OLS or linregress
or any of the third party packages. Is the understanding correct that np.mean(y) = 0
for Linear Regresssion without intercept?
What is the fastest way in numpy to get the RSquare for Linear Regression with 1 Variable and no intercept?