Blog
Linear Regression Model and Gradient Descent Algorithm
Univariate Linear Regression and Gradient Descent Method Suppose we have a sample dataset \((x^{(i)},y^{(i)}),i=1,2,...,m\) as shown in the figure below: It is obvious that \(y\) is linearly correlated with \(x\) . We establish a linear regression model between \(y\) and \(x\) , where \(x\) is the feature variable, and the hypothesis function is defined as: \[h_\theta(x)=\theta_0+\theta_1x\]The cost function is given by:
January 17, 2026