79222744

Date: 2024-11-25 11:05:33
Score: 1
Natty:
Report link

For a 2x2 matrix (linear fit line) you can use:R2=cov(x,y)⋅cov(x,y)/(var(x)⋅var(y)). in python this would be: parameters, covariance = curve_fit(lin_func, x, y)

r_squared = covariance[0][1]*covariance[1][0]/(covariance[0][0]*covariance[1][1])

got the formula from: https://stats.stackexchange.com/questions/17050/explanation-for-r-squared-as-ratio-of-covariances-and-variances

Reasons:
  • Whitelisted phrase (-1.5): you can use
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Jojo