多元线性回归(multivariate linear regression):
在线性回归问题(Linear regression)中,引入多个特征变量(Multiple Features)作为输入,也被称为“多元线性回归(Multivariate Linear Regression)”.
符号定义:
假设函数(hypothesis function):
The multivariable form of the hypothesis function accommodating these multiple features is as follows:
Using the definition of matrix multiplication, our multivariable hypothesis function can be concisely represented as:
代价函数(cost function) :
问题描述:
找到值,使得最小。
梯度下降算法(gradient descent):
Gradient Descent for Multiple Variables:
The gradient descent equation itself is generally the same form; we just have to repeat it for our 'n' features:
In other words:
正规方程法(normal equation):
The normal equation formula is given below:
注:当数据量超过10,000或者说很大时,正规方程法会很慢。