Least-square fitting for points in two dimensions doesn't pass through symmetrical axis
I'm trying to draw the best fitting line for given (x, y) data points. Here shows data points (red pixels) and estimated line (green), I obtained using the following library. import numpy as np m, c = np.linalg.lstsq(A, y)[0] Documentation for the used library module. We can see data points are roughly symmetrically distributed. The problem is why is this line not having the gradient similar to the long symmetric axis through the data points? Can you please explain can this result is correct? Then, how does it give a minimum error? (The line is drawn correctly using gradient returned by the ls
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.