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:

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.
Inheritance diagram of pyunlocbox.functions

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 :

Inheritance diagram of pyunlocbox.solvers

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:

Inheritance diagram of pyunlocbox.acceleration

Operators module

This module implements operators functions :

  • grad() Gradient function for up to 4 dimensions
  • div() Divergence function for up to 4 dimensions