線代和概率論補漏

1、Trace
the trace of a square matrix A is defined as the sum of elements on the main diagonal of A.
The trace of a matrix is sum of the eigenvalues, and it is invariant with respect to a change of basis.

Properties:


  • tr(A)=tr(AT)tr(A)=tr(A^T)
  • tr(A+B)=tr(A)+tr(B)tr(A+B)=tr(A)+tr(B)
  • tr(cA)=ctr(A)tr(cA)=ctr(A)
  • if A and B are two m by n matrics, then: tr(ATB)=tr(ABT)=tr(BTA)=tr(BAT)=i,jAijBijtr(A^TB)=tr(AB^T)=tr(B^TA)=tr(BA^T)=\sum_{i,j}A_{ij}B_{ij}.This means that the trace of a product of equal-sized matrics functions similarly to a dot product of vectors.
  • A is an m by n matrix and B is an n by m matrix, then: tr(AB)=tr(BA)tr(AB)=tr(BA).
  • Cyclic property: tr(ABCD)=tr(BCDA)=tr(CDAB)=tr(DABC)tr(ABCD)=tr(BCDA)=tr(CDAB)=tr(DABC).
  • Similarity invariance: tr(P1AP)=tr(A)tr(P^{-1}AP)=tr(A).
  • Trace of projection matrix is the dimension of the target space: PX=X(XTX)1XTtr(Px)=rank(X)P_X=X(X^TX)^{-1}X^T \Rightarrow tr(P_x)=rank(X)

2、協方差
方差,單個隨機變量的離散程度。
σx2=1n1i=1n(xixˉ)2\sigma_x^2 = \frac{1}{n-1}\sum_{i=1}^{n}(x_i-\bar{x})^2.
協方差,兩個隨機變量的相似程度。
σ(x,y)=1n1i=1n(xixˉ)(yiyˉ)\sigma(x,y)=\frac{1}{n-1}\sum_{i=1}^{n}(x_i-\bar{x})(y_i-\bar{y}).
協方差矩陣,d個隨機變量,兩兩之間的協方差。
Σ=[σ(x1,x1)σ(x1,xd)σ(xd,x1)σ(xd,xd)]\Sigma=\left[ \begin{matrix} \sigma(x_1,x_1) & \dots & \sigma(x_1,x_d) \\ \vdots & \ddots & \vdots \\ \sigma(x_d,x_1) & \dots &\sigma(x_d, x_d) \end{matrix} \right]

X=[x1x2xn]dn,xiRdX=\left[ \begin{matrix} x_1 & x_2 & \dots & x_n\end{matrix} \right]_{d*n}, x_i \in R^d

sample covariance S=XXT=[x1xn][x1TxnT]TS=XX^T=\left[ \begin{matrix}x_1 & \dots & x_n \end{matrix} \right]\left[ \begin{matrix}x_1^T \\ \vdots \\ x_n^T \end{matrix} \right]^Tddd*d的矩陣,第ii行,第jj列是第ii個屬性和第jj個屬性的協方差。

3、空間
Euclidean space, norm,兩者是什麼關係,還有什麼空間,這是哪門課的概念?
不嚴謹的理解
歐式空間(希爾伯特空間):線性空間
歐式幾何,幾何原本中五個基本假設:

  1. 兩點定一線
  2. 線段變直線
  3. 圓心+半徑 圓
  4. 直角都相等
  5. 過直線外一點有且只有一條平行線
    前4個比較直觀,第5個沒法證明。
    洛巴切夫斯基:過直線外一點,有多條平行線。
    羅氏幾何
    黎曼:過直線外一點,沒有平行線。比如,球面。
    非歐幾何。
    愛因斯坦 宇宙空間 彎曲的空間 航海學

參考:https://www.youtube.com/watch?v=_l7gyzguikE

4、正太分佈
p(x)=12πσe(xμ)22σ2p(x)=\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}}
p(x)=1(2π)1/kΣe(xμ)TΣ1(xμ)p(x)=\frac{1}{\sqrt{(2\pi)^{1/k}|\Sigma|}}e^{-(x-\mu)^T\Sigma^{-1}(x-\mu)}

5、距離、範數
定義:設XX是一個非空集合,任意給定一對這一集合的元素x,yx,y,都給定一個實數d(x,y)d(x,y)與它們對應,並且滿足:

  1. d(x,y)0d(x,y)\ge 0
  2. d(x,y)=0d(x,y)=0 if and only if x=yx=y
  3. d(x,y)=d(y,x)d(x,y)=d(y,x)
  4. d(x,y)d(x,z)+d(z,y)d(x,y)\le d(x,z)+d(z,y)
    則稱d(x,y)d(x,y)是這兩點之間的距離。
    抽象 最重要的屬性
    具體
    定義:設x||x||RnR^n的範數,若滿足:
  5. x0,xRn||x||\ge 0, \forall x \in R^n
  6. x=0||x||=0 if and only if x=0x=0
  7. αx=αx,αR,xRn||\alpha x||=|\alpha|||x||, \forall \alpha \in R, x \in R^n
  8. x+yx+y,x,yRn||x+y||\le ||x||+||y||, \forall x, y \in R^n
    注:簡單看成到零點距離多了3

內積空間
定義:設(x,y)R(x,y)\in R, 且滿足:

  1. 對稱性
  2. 對第一變元的線性性
  3. 正定性
    則稱(x,y)(x,y)爲內積。

歐幾里得幾何學需要內積,但連續的概念不需要內積,甚至不需要距離。例如:社交圈的描述;學號的指定是“連續”的。

元素 規則

具體(加東西)---------------------內積(歐式空間、希爾伯特空間)--------------------範數(巴納赫空間)----------------距離--------------拓撲空間---------》抽象(減東西)

參考:http://open.163.com/newview/movie/free?pid=M8PTB0GHI&mid=M8PTBUHT0

6、for any matrix AA with column AiA_i the following identity is true:
A2=AiTAi2=Tr(ATA) \left\lVert A\right\rVert^2= \left\lVert A_i^TA_i\right\rVert^2=Tr(A^TA)
https://en.wikipedia.org/wiki/Matrix_norm

7、maxY Tr(YTMY)s.t. YTY=Idd\max_Y \ Tr(Y^TMY) \\ s.t. \ Y^TY=I_{d*d}
solution is maximum eigenvectors of M.
minY Tr(YTMY)s.t. YTY=Idd\min_Y \ Tr(Y^TMY) \\ s.t. \ Y^TY=I_{d*d}
solution is minmum eigenvectors of M.

(6,7不理解,先記住)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章