Computational Physics, Python, Linear Algebra, Math, Mathematics.
the regression line: x_line = np.linspace(0, 5, 1000) y_line = coefs[0]*x_line + coefs[1] plt.plot(x, y, '*') plt.plot(x_line, y_line) plt.show() Conclusion You can see that the pseudo-inverse can be very useful for this kind of problems! The series is not completely finished since we still have