r value on poly fit python code example
Example: r value on poly fit python
x_values = [1,2,3]
y_values = [1,5,25]
correlation_matrix = np.corrcoef(x_values, y_values)
correlation_xy = correlation_matrix[0,1]
r_squared = correlation_xy**2
print(r_squared)