Machine Learning part2--Multiple Features
Multiple Features
Linear regression with multiple variables is also known as "multivariate linear regression".
多变量的线性回归也被称为 "多变量线性回归"。
We now introduce notation for equations where we can have any number of input variables.
现在我们介绍一下方程的符号,其中我们可以有任何数量的输入变量。
The multivariable form of the hypothesis function accommodating these multiple features is as follows:
这些多重特征的假设函数的多变量形式如下:
hθ(x)=θ0+θ1x1+θ2x2+θ3x3+⋯+θnxn
In order to develop intuition about this function, we can think about θ0 as the basic price of a house, θ1 as the price per square meter, θ2 as the price per floor, etc. x1 will be the number of square meters in the house, x2 will be the number of floors, etc.
Using the definition of matrix multiplication, our multivariable hypothesis function can be concisely represented as:
This is a vectorization of our hypothesis function for one training example。
这是我们对一个训练实例的假设函数的矢量化。
Remark: Note that for convenience reasons in this course we assume . This allows us to do matrix operations with theta and x. Hence making the two vectors 'θ' and x(i) match each other element-wise (that is, have the same number of elements: n+1).]
Gradient Descent for Multiple Variables