@@ -59,7 +59,7 @@ def callback(x, pf, pg, eps, cost):
5959L  =  np .abs ((Aop .H  *  Aop ).eigs (1 )[0 ])
6060tau  =  0.95  /  L 
6161eps  =  5e-3 
62- maxit  =  100 
62+ maxit  =  300 
6363
6464# IHT 
6565l0  =  pyproximal .proximal .L0Ball (3 )
@@ -99,6 +99,7 @@ def callback(x, pf, pg, eps, cost):
9999                                                            callback = lambda  x : callback (x , l2 , l1 , eps , costa ))
100100nitera  =  len (costa )
101101
102+ 
102103# TWIST (Note that since the smallest eigenvalue is zero, we arbitrarily 
103104# choose a small value for the solver to converge stably) 
104105l1  =  pyproximal .proximal .L1 (sigma = eps )
@@ -135,11 +136,11 @@ def callback(x, pf, pg, eps, cost):
135136############################################################################### 
136137# Finally, let's compare the converge behaviour of the different algorithms 
137138
138- fig , ax  =  plt .subplots (1 , 1 , figsize = (8 , 3 ))
139- ax .semilogy (costi , 'r' , lw = 2 , label = r'$x_{ISTA} (niter=%d)$'  %  niteri )
140- ax .semilogy (costf , 'g' , lw = 2 , label = r'$x_{FISTA} (niter=%d)$'  %  niterf )
141- ax .semilogy (costa , 'm' , lw = 2 , label = r'$x_{AA-ISTA} (niter=%d)$'  %  nitera )
142- ax .semilogy (costt , 'b' , lw = 2 , label = r'$x_{TWIST} (niter=%d)$'  %  maxit )
139+ fig , ax  =  plt .subplots (1 , 1 , figsize = (8 , 4 ))
140+ ax .loglog (costi , 'r' , lw = 2 , label = r'$x_{ISTA} (niter=%d)$'  %  niteri )
141+ ax .loglog (costf , 'g' , lw = 2 , label = r'$x_{FISTA} (niter=%d)$'  %  niterf )
142+ ax .loglog (costa , 'm' , lw = 2 , label = r'$x_{AA-ISTA} (niter=%d)$'  %  nitera )
143+ ax .loglog (costt , 'b' , lw = 2 , label = r'$x_{TWIST} (niter=%d)$'  %  maxit )
143144ax .set_title ('Cost function' , size = 15 , fontweight = 'bold' )
144145ax .set_xlabel ('Iteration' )
145146ax .legend ()
@@ -154,4 +155,3 @@ def callback(x, pf, pg, eps, cost):
154155# When this information is not available, IHT may become suboptimal. In this case the 
155156# FISTA or AA-ISTA solvers should always be preferred (over ISTA) and TwIST represents  
156157# an alternative worth checking. 
157- 
0 commit comments