1.表示
用下标表示这是第几个特征值,用上标表示这是第几组数据
举例:
x
(
1
)
=
[
2014
5
1
45
]
x^{(1)}=\left[ \begin{matrix} 2014\\ 5 \\ 1 \\ 45 \end{matrix} \right]
x(1)=⎣⎢⎢⎡20145145⎦⎥⎥⎤
x
1
(
2
)
=
1416
x^{(2)}_1=1416
x1(2)=1416
2.函数式
previously:
h
θ
(
x
)
=
θ
0
+
θ
1
x
h_{\theta}(x)=\theta_0+\theta_1x
hθ(x)=θ0+θ1x
after:
h
θ
(
x
)
=
θ
0
+
θ
1
x
1
+
θ
2
x
2
+
θ
3
x
3
+
θ
4
x
4
h_{\theta}(x)=\theta_0+\theta_1x_1+\theta_2x_2+\theta_3x_3+\theta_4x_4
hθ(x)=θ0+θ1x1+θ2x2+θ3x3+θ4x4
3.简化表达
令:
x
0
=
1
x_0=1
x0=1
那么有
x
=
[
x
0
x
1
x
2
⋮
x
n
]
,
θ
=
[
θ
0
θ
1
θ
2
⋮
θ
n
]
x=\left[ \begin{matrix} x_0\\ x_1\\ x_2\\ \vdots \\ x_n \end{matrix} \right],\theta=\left[ \begin{matrix} \theta_0\\ \theta_1\\ \theta_2\\ \vdots \\ \theta_n\end{matrix} \right]
x=⎣⎢⎢⎢⎢⎢⎡x0x1x2⋮xn⎦⎥⎥⎥⎥⎥⎤,θ=⎣⎢⎢⎢⎢⎢⎡θ0θ1θ2⋮θn⎦⎥⎥⎥⎥⎥⎤
根据线性代数的知识,我们有
h
θ
(
x
)
=
θ
T
x
h_{\theta}(x)=\theta^Tx
hθ(x)=θTx