Lecture 9 State Space Gradient Descent Gibbs Sampler with Simulated Annealing
2 Continuous Space Gradient Descent E (a, b, c) Step size has to be small 0.01 might not work begins to work
3 State Space Gradient Descent For each pixel x,y For each possible state S if F(x,y) = 0, E 0 =... if F(x,y) = 1, E 1 =.... if F(x,y) = 255, E 255 = … Select state with minimum E Let F(x,y) = S Repeat Until no change in E
4 State Space Gradient Descent F 0 (x,y) F 1 (x,y) RANDOM
5 Energy means Global Energy x-1,y x,y-1 x,y Change in (x,y) = change in E of (x,y), (x-1,y), (x,y-1) Clique - neighborhood affected
6 State Space Gradient Descent (x,y-1) (x-1,y) (x-1,y-1) (x,y)
7 State Space Gradient Descent F 0 (x,y)E 0 (x,y) F 1 (x,y) E 1 (x,y) F t (x,y)
8 State Space Gradient Descent Greedy - Takes best step Problem - Stuck at local minimum
9 Gradient Descent Algorithm 1. Initialize F 0 (x,y) = Random For each pixel (x,y) For each state S = if F(x,y) = 0, E 0 =... if F(x,y) = 1, E 1 =.... if F(x,y) = 255, E 255 = … Choose state with minimum E, F(x,y) = S 3. Repeat step 2 until E is stable (not decrease)
10 Gibbs Sampler 1. Start Temperature T is high 2. Initialize F 0 (x,y) = Random For each pixel (x,y) For each state S = if F(x,y) = 0; E 0 =... ; P 0 =... if F(x,y) = 1; E 1 = … ; P 1 =.... if F(x,y) = 255; E 255 = …; P 255 =... For each P i = P i /sum(P i ) 4. Sample for state S from pdf P i F(x,y) = S 5. Reduce T = T * Repeat step 3-4 while E is not stable
11 Gibbs Sampler 3 issues - 1) From E, how to get P 2) How to sample from PDF 3) Why reduce T, what is T for?
12 Gibbs Sampler: Find P P i E - Energy proportional normalizing factor Rand(0..1) =.43 F(x,y) = 3
13 Gibbs Sampler : Why T? T High - Random Walk T Low - Approach o (Gradient Descent) 20%
14 Analyze States = 3 E(0) = 2E(1) = 3E(2) = 4 Gibbs Sampler : Why T? T=100P =.98P =.97P =.96 P =.33P =.33P =.33 T=10P =.82P =.74P =.67 P =.36P =.33P =.31 T=100P = 2.06*10 -9 P = 9.3* P = 4.2* P =.999P =.00001P = T controls distribution of PDF
15 Why slowly reduce T gets global min?