Reference guide¶
Package overview¶
The toolbox is organized around two class hierarchies: the functions and the
solvers. Instantiated functions represent convex functions to optimize.
Instantiated solvers represent solving algorithms. The
pyunlocbox.solvers.solve()
solving function takes as parameters a solver
object and some function objects to actually solve the optimization problem.
See this function’s documentation for a typical usage example.
The pyunlocbox
package is divided into the following modules:
pyunlocbox.solvers
: problem solvers, implement the solvers class hierarchy and the solving functionpyunlocbox.functions
: functions to be passed to the solvers, implement the functions class hierarchypyunlocbox.operators
: useful operators to be passed to the functionspyunlocbox.acceleration
: acceleration schemes to be passed to the solvers, implement the acceleration class hierarchy
Functions module¶
This module implements function objects which are then passed to solvers. The
func
base class defines the interface whereas specialised classes who
inherit from it implement the methods. These classes include :
dummy
: A dummy function object which returns 0 for the_eval()
,_prox()
and_grad()
methods.norm
: Norm operators base class.norm_l1
: L1-norm who implements the_eval()
and_prox()
methods.norm_l2
: L2-norm who implements the_eval()
,_prox()
and_grad()
methods.norm_nuclear
: nuclear-norm who implements the_eval()
and_prox()
methods.norm_tv
: TV-norm who implements the_eval()
and_prox()
methods.
proj
: Projection operators base class.proj_b2
: Projection on the L2-ball who implements the_eval()
and_prox()
methods.

Solvers module¶
This module implements solver objects who minimize an objective function. Call
solve()
to solve your convex optimization problem using your instantiated
solver and functions objects. The solver
base class defines the
interface of all solver objects. The specialized solver objects inherit from
it and implement the class methods. The following solvers are included :
gradient_descent
: Gradient descent algorithm.forward_backward
: Forward-backward proximal splitting algorithm.douglas_rachford
: Douglas-Rachford proximal splitting algorithm.generalized_forward_backward
: Generalized Forward-Backward.primal_dual
: Primal-dual algorithms.mlfbf
: Monotone+Lipschitz Forward-Backward-Forward primal-dual algorithm.projection_based
: Projection-based primal-dual algorithm.

Acceleration module¶
This module implements acceleration schemes for use with the
pyunlocbox.solvers
. Pass a given acceleration object as an argument to
your chosen solver during its initialization so that the solver can use it. The
base class accel
defines the interface of all acceleration objects.
The specialized acceleration objects inherit from it and implement the class
methods. The following acceleration schemes are included:
dummy
: Dummy acceleration scheme. It does nothing.backtracking
: Backtracking line search.fista
: FISTA acceleration scheme.fista_backtracking
: FISTA with backtracking.regularized_nonlinear
: Regularized nonlinear acceleration.
