/LinearRegression

This is my version of linear regression from scratch. This is my attempt to explain clearly the simplest ML algorithm in Python.

Primary LanguagePython

LinearRegression

This is my version of linear regression from scratch. This is my attempt to explain clearly the simplest ML algorithm in Python.

Linear Regression from Scratch Hi Everyone,  This is my version of linear regression from scratch. This is my attempt to explain clearly the simplest ML algorithm in Python.  Based on the name, we can guess that the algorithm is trying to predict linear relationship between the input variables X and single output variable Y.  If X posses multiple variables it is Multiple Linear Regression.  Model Representation:  Independent variable, X  Dependent variable, Y  Y=β0+β1X β1 is the coefficient and β0 is the bias coefficient.  The equation is similar to a line representation, y=mx+b, where m=β1(Slope) and b=β0(Intercept) We basically want to draw a line that estimates relationship between X and Y.  There are two ways to find the coefficients,  Ordinary Least Square Method

  1. Gradient Descent Approach Ordinary Least Square Method Lets say we have a few points and we want to plot the scatter points