MACHINE LEARNING Algorithms from scratch

Linear Regression

what is Linear Regression?

Linear regression is a fundamental technique in machine learning and statistics used for predicting a continuous outcome variable (also called the dependent variable) based on one or more predictor variables (independent variables). The goal is to find the linear relationship between the independent variables and the dependent variable. It is a Supervised Machine learning algorith(Regression)

The equation for a simple linear regression with one independent variable is:

y=mx+by=mx+b

Here:

y is the dependent variable.
x is the independent variable.
m is the slope of the line.
b is the y-intercept.

For multiple linear regression with more than one independent variable, the equation becomes:

y=b0+b1x1+b2x2+…+bnxny=b0+b1x1+b2x2+…+bnxn

Here:

y is the dependent variable.
x2,…,xnx1,x2,…,xn are the independent variables.
b0 is the y-intercept.
b1,b2,…,bnb1,b2,…,bn are the coefficients associated with each independent variable.

The goal of linear regression is to find the values of the coefficients (b0,b1,…,bnb0,b1,…,bn) that minimize the difference between the predicted values and the actual values of the dependent variable. This is often done by minimizing the sum of squared differences, known as the least squares method.

I wrote a machine learning algorithm from scratch check out my GitHub repo for the code; https://github.com/anonymousAsquare/machineLearningAlgorithmFromScratch/blob/master/Linear_Regression/linearRegression.ipynb

Checkout my GitHub repo for the codes; https://github.com/anonymousAsquare/machineLearningAlgorithmFromScratch/blob/master/Linear_Regression/linearRegression.ipynb

Design a site like this with WordPress.com
Get started