Reference guide

Toolbox overview

The toolbox is organized around two classes 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 function
  • pyunlocbox.functions: functions to be passed to the solvers, implement the functions 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.

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

Operators module

This module implements operators functions :

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