/Linear-Regression

Univariate and Multivariate Linear Regression

Primary LanguageJupyter Notebook

Linear-Regression

This repository explores Univariate and Multivariate Linear Regression, as well as the Normal Equation Method of solving an equation.

Author

You can get in touch with me on LinkedIn!

If you liked my repository, kindly support my work by giving it a ⭐!

About this Repository

Linear Regression Cost Function

The cost function of Linear regression is given as:



Parameter Update

The parameter(s) theta, are updated with the equation below.
Notice that alpha is the learning rate/step size.



Vectorization

The equations can be vectorized and implemented as matrices.


Plotting Cost against Number of Iterations



This is an effective tool for debugging an algorithm.
The cost MUST go down over the number of increasing iterations.



Normal Equation Method

This method is an alternative to regression, and solves for the parameters directly.