Svd, Data Science, Machine Learning, Data Visualization, Fluid Dynamics.
np.linalg.inv(np.diag(S)) @ U.T @ b # Least-square fit ### Plot fig, ax = plt.subplots() ax.scatter(a, b, color = 'k', label = 'Data') ax.plot(a, a*x, color = 'r', label = 'True Line') ax.plot(a, a*xtilde, color = 'b', label = 'Estimated Line') ax.set_xlabel(r'$a$') ax.set_ylabel(r'$b$')