Linear Algebra / ์ ํ๋์ํ
- matrix์ ์ํ
- ๋ฐ์ดํฐ ๊ณผํ์์ ์ค์ํ ์ญํ
n * m matrix๊ฐ ๋ํ๋ผ ์ ์๋ ๊ฒ
row | column | |
Data | object | features |
Geometric Point Sets | point | dimensions |
Systems of equations | equations | ๊ฐ ๋ณ์์ coefficient |
- Graphs/Networks: M[i, j] = vertex i -> vertex j edge ๊ฐ์
- Vectors: any row, column or d*1 matrix
Vector ์ฌ์ด์ ๊ฐ
- ๋ฒกํฐ A์ B ์ฌ์ด์ ๊ฐ๋
- cos(0) = 1 ---> perfect similarity = 0
- cos(pi/2) = 0 ---> ๊ด๋ จ์ด ์๋ค
- cos(pi) = -1 ---> perfect anticorrelation
==> cos = correlation of mean zero variables
- unit vector์ ๋ํด์ ๊ทธ ๋ฒกํฐ์ ํฌ๊ธฐ๋ 1์ด๋ฏ๋ก, dot product๋ก ์ ์๋๋ค.
Transpose
- ์ ์: a*b matrix -> b*a matrix๋ก ๋ณํํ๋ ๊ฒ
- addition and transposition
-> B = A^T๋ผ๊ณ ๊ฐ์ ํ์ ๋ ํฉํ๋ ๋ฐฉ๋ฒ
- a ๊ฐ์ ์กฐ์ ํ ์ ์์.
Matrix multiplication & Dot Products
- A*B๋ ๊ฐ์ ๋ด๋ถ ์ฐจ์์ ๊ณต์ ํด์ผ๋ง ๊ณ์ฐ ๊ฐ๋ฅํ๋ค.
- ๊ฒฐ๊ณผํ๋ ฌ์ ๊ฐ ์์๋ row/column ๋ฒกํฐ์ dot product
- dot product๋ ๋ ๊ฐ์ ๋ฒกํฐ๊ฐ ์ผ๋ง๋ ์ ์ฌํ์ง ์ธก์ ํ๋ ๋ฐฉ๋ฒ์ด๋ค.
- ํ๋ ฌ์ ๊ณฑ์ ์ ๊ฒฐํฉ๋ฒ์น์ ์ฑ๋ฆฝํ๋ ๊ตํ๋ฒ์น์ ์ฑ๋ฆฝํ์ง ์๋๋ค.
Multiplying Feature Matrices
- ํ๋ ฌ A๊ฐ n*d data matrix๋ผ๊ณ ๊ฐ์ ํด๋ณด์.
- n: ๋ฌธ์, d: ์ฉ์ด
- C ํ๋ ฌ์ n*n matrix of dot products - ์ ๋ค ๊ฐ์ ์ ์ฌ๋๋ฅผ ๋ํ๋ด๋ ํ๋ ฌ์ด ๋๋ค.
- D ํ๋ ฌ์ d*d matrix of dot products - ํน์ฑ ๊ฐ์ ์ ์ฌ๋๋ฅผ ๋ํ๋ด๋ ํ๋ ฌ์ด ๋๋ค.
- covariance matrix ๋ก ํด์ํ ์ ์๋ค.
์์) car - automobile : D matrix ๊ณ์ฐ ํ ๋ ๊ฐ์ ๋ํ๋ด๋ cell์ ํ์ธํด๋ณด๋ฉด ๋ค๋ฅธ cell๋ณด๋ค ๊ฐ์ด ๋์ ๊ฒ์ ํ์ธํ ์ ์๋ค. - ์ ์ฌ๋๊ฐ ๋๋ค.
Interpreting Matrix Multiplication
- 0/1 adjacency matrices ๋ฅผ ๊ณฑํ๋ ๊ฒ์ ๋ ์ ์ฌ์ด์ ๊ฑฐ๋ฆฌ๋ฅผ ๋ํ๋ด๋ ํ๋ ฌ์ด ๋๋ค.
- Multiplication by permutation matrices๋ ํ/์ด์ ์ฌ์ ๋ ฌํ๋ค.
Matrix Rank
- ์ ์: ์ ํ ๋ ๋ฆฝ์ ์ธ row์ ์๋ฅผ ์ธก์ ํ๋ ๊ฒ
- n*n matrix๋ ์์๊ฐ n์ด ๋์ด์ผ ํ๋ค.
* ๋ญํฌ๋ ํ๋ ฌ์ ์ด๋ค๋ก ์์ฑ๋ ์ ์๋ ๋ฒกํฐ ๊ณต๊ฐ์ ์ฐจ์.
์ฐธ๊ณ ๋ฌธํ: https://blog.naver.com/sw4r/221416614473
[๊ธฐ์ด ์ ํ๋์] ํ๋ ฌ์์ Rank (๋ญํฌ) ๋?
์ ํ๋์์์ ๋ฑ์ฅํ๋ Rank ๋ผ๋ ๊ฐ๋ ์ ๋ํด์ ๊ฐ๋ตํ๊ฒ ์์๋ณด์. ์ํค์ ์ ์๋ฅผ ์ฐ์ ํ์ธํด๋ณด...
blog.naver.com
2=1 ์ฆ๋ช ์ผ๋ก๋ถํฐ ์ ์ ์๋ ๊ฒ
- ์ฆ๋ช ์ ์ค๋ฅ๊ฐ ์๊ธฐ๋ ์์ธ: 0์ผ๋ก ๋๋๋ ๊ฒ์ด ๋ถ๊ฐ๋ฅํ๋ค๋ ๊ฒ์ ๊ฐ๊ณผํจ
- ์ ํ ๋์์์ singular matrix๋ ํฌํจ๋๋ค.
Matrix๋ฅผ ๋๋๋ ๊ฒ
- inverse operation: x๋ฅผ identity element๋ก ๋ด๋ฆฌ๋ ๊ฒ
- ๊ณฑ์ ์ inverse๋ ๋๋์ .
- ๋ง์ ์ inverse๋ ๋บ์ .
Matrix Inversion
- A^-1 : A * A^-1 = I ์ธ matrix (I = identity matrix)
- A ํ๋ ฌ์ด inverse๋ฅผ ๊ฐ์ง๋ค๋ฉด, Gaussian elimination์ ์ด์ฉํ์ฌ ๊ณ์ฐ๋ ์ ์๋ค.
* ๊ฐ์ฐ์ค ์๊ฑฐ๋ฒ
https://m.blog.naver.com/siri0831/222033492473
์ ํ๋์ํ(1) - ๊ฐ์ฐ์ค ์๊ฑฐ๋ฒ(Gauss Elimination)
์๋ ํ์ธ์! ์ค๋๋ถํฐ ์ ํ๋์ํ์ ์กฐ๊ธ์ฉ ์ฌ๋ ค ์ ๋ฆฌํด๋ณผ๊น ํด์~ ๋ํ๊ต ์ ํํ์ฌ ๋ชจ๋๋ค ์ฒ์ ์ ํ๊ฒ ๋ ...
blog.naver.com
Matrix Inversion and Linear Systems
- Ax=b ์์ A์ ์ญํ๋ ฌ A^-1์ ๊ณฑํ๋ฉด ๋ค์์ ์์ด ๋ํ๋๋ค.
- ์ ํ์์ ํด๋ฅผ ๊ตฌํ๋ ๊ฒ์ matrix์ ์ญํ๋ ฌ์ ๊ณฑํ๋ ๊ฒ๊ณผ ๊ฐ๋ค.
Principle Component Analysis (PCA)
- ๋ฐ์ดํฐ๋ฅผ 2๊ฐ์ ์ถ์ผ๋ก projectionํ๋ ๊ฒ์ด๋ค.
- ์ด๋ค ๊ธฐ์ค์ผ๋ก ์ถ์ ๊ณจ๋ผ์ผ ํ ๊ฒ์ธ๊ฐ?
1) 1์ฐจ์ projection์ ํ์ ๋ ๋ฐ์ดํฐ ๋ถ์ฐ์ด ๊ฐ์ฅ ํฐ ๊ฒ์ ์ ํํ๋ค.
* ์ด์ : ์ ๋ณด ์ ์ค์ ์ต์ํํด์ผํ๋ฏ๋ก
2) ์ฒซ๋ฒ์งธ ์ถ๊ณผ ์ง๊ตํ๋ฉด์ ๋ถ์ฐ์ด ๊ฐ์ฅ ํฐ ์ถ์ ์ ํํ๋ค. --> ์๋ก์ด ๊ณต๊ฐ์ ๋ง๋ค์ด๋ธ๋ค.
Singular Value Decomposition (SVD) : ํน์ด๊ฐ ๋ถํด
- ์ด๋ฏธ์ง ์ฒ๋ฆฌ ๋ฑ์ ์ฌ์ฉ๋จ
- V*, U*๋ ๊ฐ ํ๋ ฌ์ ์ญํ๋ ฌ์ด๋ผ๊ณ ์๊ฐํ๋ฉด ๋จ
- https://darkpgmr.tistory.com/106
[์ ํ๋์ํ #4] ํน์ด๊ฐ ๋ถํด(Singular Value Decomposition, SVD)์ ํ์ฉ
ํ์ฉ๋ ์ธก๋ฉด์์ ์ ํ๋์ํ์ ๊ฝ์ด๋ผ ํ ์ ์๋ ํน์ด๊ฐ ๋ถํด(Singular Value Decomposition, SVD)์ ๋ํ ๋ด์ฉ์ ๋๋ค. ๋ณดํต์ ๋ณต์์ ๊ณต๊ฐ์ ํฌํจํ์ฌ ์ ์ํ๋ ๊ฒ์ด ์ผ๋ฐ์ ์ด์ง๋ง ์ด ๊ธ์์๋ ์ค์(real
darkpgmr.tistory.com
Reconstructing Lincoln