linear regression hypothesis:
h
(
x
)
=
W
T
X
h(x)=W^TX
h(x)=WTX
多元线性回归的表达式:
y
^
=
w
1
∗
x
1
+
w
2
∗
x
2
+
.
.
.
+
w
n
x
n
\hat{y}=w_1*x_1+w_2*x_2+...+w_nx_n
y^=w1∗x1+w2∗x2+...+wnxn
即
y
^
=
∑
i
=
1
n
w
i
x
i
\hat{y}=\sum\limits_{i=1}^{n}w_ix_i
y^=i=1∑nwixi
设
1)向量W =(w1,w2,…,wn), 向量X =(x1,x2,…,xn)
2)转为矩阵表示
W
=
[
w
1
w
2
.
.
w
n
]
W = \begin{bmatrix} w1\\ w2\\ .\\ .\\ wn\end{bmatrix}
W=
w1w2..wn
X
=
[
x
1
x
2
.
.
x
n
]
X = \begin{bmatrix} x1\\ x2\\ .\\ .\\ xn\end{bmatrix}
X=
x1x2..xn
将W转置
W
T
=
[
w
1
w
2
.
.
.
w
n
]
W^T= \begin{bmatrix} w1&w2&...&wn\\ \end{bmatrix}
WT=[w1w2...wn]
则
h
(
x
)
=
W
T
X
=
[
w
1
w
2
.
.
.
w
n
]
[
x
1
x
2
.
.
x
n
]
=
[
w
1
∗
x
1
+
w
2
∗
x
2
+
.
.
.
+
w
n
∗
x
n
]
h(x)=W^TX = \begin{bmatrix} w1&w2&...&wn\\ \end{bmatrix} \begin{bmatrix} x1\\ x2\\ .\\ .\\ xn\end{bmatrix} = \begin{bmatrix} w1*x1+w2*x2+...+wn*xn\end{bmatrix}
h(x)=WTX=[w1w2...wn]
x1x2..xn
=[w1∗x1+w2∗x2+...+wn∗xn]
以上为个人对
W
T
X
W^TX
WTX的理解,如有错误请指正
————————————————
参考:https://blog.csdn.net/qq_42442369/article/details/86425504
https://baike.baidu.com/item/%E5%90%91%E9%87%8F/1396519?fr=ge_ala
https://blog.csdn.net/weixin_43178406/article/details/103729041