MachineLearningpart2--MultipleFeatures
MultipleFeatures
Linearregressionwithmultiplevariablesisalsoknownas"multivariatelinearregression".
多变量的线性回归也被称为"多变量线性回归"。
Wenowintroducenotationforequationswherewecanhaveanynumberofinputvariables.
现在我们介绍一下方程的符号,其中我们可以有任何数量的输入变量。
 
Themultivariableformofthehypothesisfunctionaccommodatingthesemultiplefeaturesisasfollows:
这些多重特征的假设函数的多变量形式如下:
hθ(x)=θ0+θ1x1+θ2x2+θ3x3+⋯+θnxn
 
Inordertodevelopintuitionaboutthisfunction,wecanthinkaboutθ0asthebasicpriceofahouse,θ1asthepricepersquaremeter,θ2asthepriceperfloor,etc.x1willbethenumberofsquaremetersinthehouse,x2willbethenumberoffloors,etc.
Usingthedefinitionofmatrixmultiplication,ourmultivariablehypothesisfunctioncanbeconciselyrepresentedas:
 
Thisisavectorizationofourhypothesisfunctionforonetrainingexample。
这是我们对一个训练实例的假设函数的矢量化。
Remark:Notethatforconveniencereasonsinthiscourseweassume.Thisallowsustodomatrixoperationswiththetaandx.Hencemakingthetwovectors'θ'andx(i)matcheachotherelement-wise(thatis,havethesamenumberofelements:n+1).]
 
GradientDescentforMultipleVariables