Standard approach in Machine learning is Regression. This video explains how to perform Regression for a 2D dataset using the Least Squares method with Python Numpy and plot with Matplotlib. 

#python 

Least Square Regression for Linear and Non Linear By Python
2 Likes4.65 GEEK