Deep Learning Srihari
1
Linear Algebra for Machine Learning Sargur N. Srihari - - PowerPoint PPT Presentation
Deep Learning Srihari Linear Algebra for Machine Learning Sargur N. Srihari srihari@cedar.buffalo.edu 1 Deep Learning Srihari Overview Linear Algebra is based on continuous math rather than discrete math Computer scientists have
Deep Learning Srihari
1
Deep Learning Srihari
2
Deep Learning Srihari
3
Deep Learning Srihari
4
x= x1 x2 xn ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⇒ xT = x1,x2,..xn ⎡ ⎣ ⎤ ⎦
Deep Learning Srihari
5
A= A1,1 A1,2 A2,1 A2,2 ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥
Deep Learning Srihari
6
Deep Learning Srihari
7
A = A1,1 A1,2 A1,3 A2,1 A2,2 A2,3 A3,1 A3,2 A3,3 ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⇒ AT = A1,1 A2,1 A3,1 A1,2 A2,2 A3,2 A1,3 A2,3 A3,3 ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥
Deep Learning Srihari
8
C = A+ B ⇒Ci,j = Ai,j + Bi,j D = aB +c ⇒ Di,j = aBi,j +c
C = A+b ⇒Ci,j = Ai,j +bj
Deep Learning Srihari
9
C = AB ⇒Ci,j = Ai,k
k
Bk,j
Deep Learning Srihari
10
Deep Learning Srihari
11
Deep Learning Srihari
12
A
11x1+ A 12x2 +....+ A 1nxn = b 1
A
21x1+ A 22x2 +....+ A 2nxn = b2
A
n1x1+ A m2x2 +....+ A n,nxn = b n
n equations in n unknowns
A = A1,1 ! A1,n " " " An,1 ! Ann ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ x= x1 " xn ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ b= b
1
" b
n
⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥
n x n n x 1 n x 1 Can view A as a linear transformation
Deep Learning Srihari
13
1 1 1 ⎡ ⎣ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥
Deep Learning Srihari
14
Ax = b A−1Ax = A−1b Inx = A−1b x = A−1b
Deep Learning Srihari
15
Deep Learning Srihari
Solution: x=A-1b
followed by back-substitution L2-3L1àL2 L3-2L1àL3
Deep Learning Srihari
17
y(x,w)= wiφi
i=1 m
x
Deep Learning Srihari
18
Deep Learning Srihari
19
A
11x1+ A 12x2 +....+ A 1nxn = b 1
A
21x1+ A 22x2 +....+ A 2nxn = b2
A
m1x1+ A m2x2 +....+ A mnxn = b m
Deep Learning Srihari
Ax= xi
i
A
:, i
ci
i
Deep Learning Srihari
– Columns are linearly dependent or matrix is singular
Deep Learning Srihari
22
f x
f (x+ y )≤ f x
∀α ∈! f α x
Deep Learning Srihari
23
x
p =
xi
p i
⎛ ⎝ ⎜ ⎞ ⎠ ⎟
1 p
x
∞ =max i
xi
Deep Learning Srihari
24
F =
2 i,j
1 2
Deep Learning Srihari
25
xT y= x
2 y 2cosθ
Deep Learning Srihari
diag(v)x= v ⊙ x
Deep Learning Srihari
27
2=1
Deep Learning Srihari
28
Deep Learning Srihari
29 Wikipedia
Deep Learning Srihari
A = A1,1 ! A1,n " " " An,1 ! Ann ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ v= v1 " vn ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ w= w1 " wn ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ ⎥ ⎥
Deep Learning Srihari
31
A = 2 1 1 2 ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥
| A−λI |= 2−λ 1 1 2−λ ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥ = 3− 4λ +λ2 vλ=1 = 1 −1 ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥,vλ=3 = 1 1 ⎡ ⎣ ⎢ ⎢ ⎤ ⎦ ⎥ ⎥
Deep Learning Srihari
32 Wikipedia
Vectors are grid points
Deep Learning Srihari
33
Deep Learning Srihari
34
Deep Learning Srihari
35
Plot of unit vectors (circle)
u∈!2
Plot of vectors Au (ellipse) with two variables x1 and x2
Deep Learning Srihari
36
Deep Learning Srihari
37
Deep Learning Srihari
38
Deep Learning Srihari
Deep Learning Srihari
– Left singular vectors of A are eigenvectors of AAT – Right singular vectors of A are eigenvectors of ATA
Deep Learning Srihari
41
Deep Learning Srihari
42
i,i
F = Tr(A)
1 2
Deep Learning Srihari
43
Deep Learning Srihari
44
Deep Learning Srihari
45
Deep Learning Srihari
46
Deep Learning Srihari
47
c
2
c
Deep Learning Srihari
48
∇c(−2xT Dc+cTc)= 0 −2DTx+2c = 0 c = DTx
Deep Learning Srihari
49
D*=argmin
D
x j
(i) −r x(i)
2 i,j
⎛ ⎝ ⎜ ⎞ ⎠ ⎟
1 2
Deep Learning Srihari
50