In this article, I will try to extend the material from univariate linear regression into multivariate linear regression (mLR). In mLR, n features are collected for each observation, and is now also a vector of dimension n+1 where is the intercept, or the coefficient for an arbitrary feature of x with all values equal toContinue reading “Multivariate Linear Regression with Gradient Descent”
Category Archives: 未分类
Gradient Descent for Univariate Linear Regression
The purpose of this article is to realize gradient descent algorithm for univariate linear regression in Python. We first briefly show the mathematics of the algorithm and then the code in Python to realize gradient descent method. The cost function that will be used is mean square error (MSE). Let’s define some notations that willContinue reading “Gradient Descent for Univariate Linear Regression”