Skip to content

Commit a9c2c99

Browse files
committed
修改两个小错误
1 parent 3ac63e7 commit a9c2c99

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed
3.3 KB
Binary file not shown.

0.math/1.CS229/markdown/1.CS229-LinearAlgebra.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Ax= b
2929
$$
3030

3131
$$
32-
\text { with } A=\left[\begin{array}{cc}{4} & {-5} \\ {-2} & {3}\end{array}\right], b=\left[\begin{array}{c}{13} \\ {-9}\end{array}\right]
32+
\text { with } A=\left[\begin{array}{cc}{4} & {-5} \\ {-2} & {3}\end{array}\right], b=\left[\begin{array}{c}{-13} \\ {9}\end{array}\right]
3333
$$
3434

3535
我们可以看到,这种形式的线性方程有许多优点(比如明显地节省空间)。
@@ -252,11 +252,17 @@ $$
252252
**CS229**讲义中所述,迹具有以下属性(如下所示):
253253

254254
- 对于矩阵$A \in \mathbb{R}^ {n \times n}$,则:$\operatorname{tr}A =\operatorname{tr}A^T$
255+
255256
- 对于矩阵$A,B \in \mathbb{R}^ {n \times n}$,则:$\operatorname{tr}(A + B) = \operatorname{tr}A + \operatorname{tr}B$
257+
256258
- 对于矩阵$A \in \mathbb{R}^ {n \times n}$,$ t \in \mathbb{R}$,则:$\operatorname{tr}(tA) = t\operatorname{tr}A$.
259+
257260
- 对于矩阵 $A$, $B$,$AB$ 为方阵, 则:$\operatorname{tr}AB = \operatorname{tr}BA$
261+
258262
- 对于矩阵 $A$, $B$, $C$, $ABC$为方阵, 则:$\operatorname{tr}ABC = \operatorname{tr}BCA=\operatorname{tr}CAB$, 同理,更多矩阵的积也是有这个性质。
259263

264+
作为如何证明这些属性的示例,我们将考虑上面给出的第四个属性。 假设$A \in \mathbb{R}^ {m \times n}$和$B \in \mathbb{R}^ {n \times m}$(因此$AB \in \mathbb{R}^ {m \times m}$是方阵)。 观察到$BA \in \mathbb{R}^ {n \times n}$也是一个方阵,因此对它们进行迹的运算是有意义的。 要证明$\operatorname{tr}AB = \operatorname{tr}BA$,请注意:
265+
260266
$$
261267
\begin{aligned} \operatorname{tr} A B &=\sum_{i=1}^{m}(A B)_{i i}=\sum_{i=1}^{m}\left(\sum_{j=1}^{n} A_{i j} B_{j i}\right) \\ &=\sum_{i=1}^{m} \sum_{j=1}^{n} A_{i j} B_{j i}=\sum_{j=1}^{n} \sum_{i=1}^{m} B_{j i} A_{i j} \\ &=\sum_{j=1}^{n}\left(\sum_{i=1}^{m} B_{j i} A_{i j}\right)=\sum_{j=1}^{n}(B A)_{j j}=\operatorname{tr} B A \end{aligned}
262268
$$
@@ -664,7 +670,7 @@ $$
664670

665671
这里,关键是要明确我们要区分的变量。
666672
在第一种情况下,我们将函数$f$与其参数$z$进行区分,然后替换参数$Ax$。
667-
在第二种情况下,我们将复合函数$g(x)=f(Ax)$直接与x进行微分
673+
在第二种情况下,我们将复合函数$g(x)=f(Ax)$直接与$x$进行微分
668674

669675
我们将第一种情况表示为$\nabla zf(Ax)$,第二种情况表示为$\nabla xf(Ax)$。
670676

@@ -763,7 +769,7 @@ $$
763769

764770
让我们应用上一节中得到的方程来推导最小二乘方程。假设我们得到矩阵$A\in \mathbb{R}^{m \times n}$(为了简单起见,我们假设$A$是满秩)和向量$b\in \mathbb{R}^{m}$,从而使$b \notin \mathcal{R}(A)$。在这种情况下,我们将无法找到向量$x\in \mathbb{R}^{n}$,由于$Ax = b$,因此我们想要找到一个向量$x$,使得$Ax$尽可能接近 $b$,用欧几里德范数的平方$\|A x-b\|_{2}^{2} $来衡量。
765771

766-
使用公式$\|x\|^{2}=x^Tx$,我们可以得到:
772+
使用公式$\|x\|^{2}=x^Tx$,我们可以得到:
767773

768774
$$
769775
\begin{aligned}\|A x-b\|_{2}^{2} &=(A x-b)^{T}(A x-b) \\ &=x^{T} A^{T} A x-2 b^{T} A x+b^{T} b \end{aligned}
@@ -821,7 +827,7 @@ $$
821827
$$
822828
请注意,这只是线性方程$Ax =\lambda x$。 这表明假设$x^T x = 1$,可能最大化(或最小化)$x^T Ax$的唯一点是$A$的特征向量。
823829

824-
**线性代数已经翻译完毕,后面的概率论部分还在翻译中,请关注[github](https://github.com/fengdu78/Data-Science-Notes/tree/master/0.math)的更新,近期将更新完。**
830+
**线性代数和概率论都已经翻译完毕,请关注[github](https://github.com/fengdu78/Data-Science-Notes/tree/master/0.math)的更新,若有修改将在github上更新**
825831

826832
欢迎大家提交PR,对语言进行润色。
827833

0 commit comments

Comments
 (0)