inpystem.tools.FISTA module¶
This module implements interfacing tools for the FISTA algorithm.
For further informations about the FISTA algorithm, have a look at 1.
- 1
BECK, Amir et TEBOULLE, Marc. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM journal on imaging sciences, 2009, vol. 2, no 1, p. 183-202.
-
class
inpystem.tools.FISTA.
FISTA
(f, df, L, g, pg, shape, Nit=None, init=None, verbose=True)¶ Fast Iterative Shrinkage-Thresholding Algorithm implementation.
- Variables
f (function) – \(C^{1,1}\) convex function.
df (function) – derivative function of f.
L (float) – Lipshitz contant of f.
g (function) – Non-smooth function.
pg (function) – g poximal operator.
shape (tuple) – The data shape.
Nit (None, int) – Number of iteration. If None, the iterations will stop as soon as the functional no longer evolve. Default is None.
init (numpy array) – Init point which shape is the same as the data. If None, a random initailization is drawn. Default is None.
verbose (bool) – If True, process informations are sent to the output. Default is True.
Nit_max (int) – Maximum number of iterations.
tau (float) – Descent step.
E (numpy array) – Functional evolution across iterations.
lim (float) – Controlls the stop condition in case Nit is None. The smallest lim, the more iterations before stopping. lim is usually 1e-4.
-
__init__
(f, df, L, g, pg, shape, Nit=None, init=None, verbose=True)¶ Initialization function for FISTA.
- Parameters
f (function) – \(C^{1,1}\) convex function.
df (function) – derivative function of f.
L (float) – Lipshitz contant of f.
g (function) – Non-smooth function.
pg (function) – g poximal operator.
shape (tuple) – The data shape.
Nit (None, int) – Number of iteration. If None, the iterations will stop as soon as the functional no longer evolve. Default is None.
init (numpy array) – Init point which shape is the same as the data. If None, a random initailization is drawn. Default is None.
verbose (bool) – If True, process informations are sent to the output. Default is True.
-
StopCritera
(n)¶ This function computes a critera that informs about the algorithm convergence at step n.
- Parameters
n (int) – Current step
- Returns
Value of the critera.
- Return type
float
-
StopTest
(n)¶ This function choose if iterations should be stopped at step n. If Nit is not None, it returns True as long as n is smaller than Nit. If Nit is None, it returns True as long as the functional is evolving fast.
- Parameters
n (int) – Current step.
- Returns
Should the iterations go on ?
- Return type
bool
-
execute
()¶ Method that executes the FISTA algorithm.
- Returns
numpy array – The optimum of the optimization problem.
dict – Extra informations about convergence.
Note
Infos in output dictionary:
E
: Evolution of the functional along the iterations.time
: Execution time.