Package parsimony :: Package functions :: Module properties :: Class NesterovFunction
[hide private]
[frames] | no frames]

Class NesterovFunction

source code

                 object --+    
                          |    
                   Gradient --+
                              |
                 object --+   |
                          |   |
LipschitzContinuousGradient --+
                              |
                 object --+   |
                          |   |
                Eigenvalues --+
                              |
                 object --+   |
                          |   |
           ProximalOperator --+
                              |
                             NesterovFunction
Known Subclasses:

Abstract superclass of Nesterov functions.

Attributes:
----------
l : Non-negative float. The Lagrange multiplier, or regularisation
        constant, of the function.

mu : Non-negative float. The Nesterov function regularisation constant for
        the smoothing.

penalty_start : Non-negative integer. The number of columns, variables
        etc., to except from penalisation. Equivalently, the first index
        to be penalised. Default is 0, all columns are included.

Instance Methods [hide private]
 
__init__(self, l, A=None, mu=5e-08, penalty_start=0)
Parameters ---------- l : Non-negative float.
source code
 
fmu(self, beta, mu=None)
Returns the smoothed function value.
source code
 
phi(self, alpha, beta)
Function value with known alpha.
source code
 
grad(self, beta)
Gradient of the function at beta.
source code
 
get_mu(self)
Return the regularisation constant for the smoothing.
source code
 
set_mu(self, mu)
Set the regularisation constant for the smoothing.
source code
 
alpha(self, beta)
Dual variable of the Nesterov function.
source code
 
A(self)
Linear operator of the Nesterov function.
source code
 
lA(self)
Linear operator of the Nesterov function multiplied by the corresponding Lagrange multipliers.
source code
 
Aa(self, alpha)
Compute A'*alpha.
source code
 
project(self, alpha)
Projection onto the compact space of the Nesterov function.
source code
 
M(self)
The maximum value of the regularisation of the dual variable.
source code
 
estimate_mu(self, beta)
Compute a "good" value of mu with respect to the given beta.
source code
 
lambda_max(self)
Largest eigenvalue of the corresponding covariance matrix.
source code
 
L(self)
Lipschitz constant of the gradient.
source code
 
prox(self, beta, factor=1.0, eps=5e-08, max_iter=1000)
The proximal operator corresponding to this function.
source code

Inherited from Gradient: approx_grad

Inherited from LipschitzContinuousGradient: approx_L

Inherited from Eigenvalues: lambda_min

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __metaclass__ = abc.ABCMeta
Metaclass for defining Abstract Base Classes (ABCs).
  __abstractmethods__ = frozenset(['M', 'phi', 'project'])
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, l, A=None, mu=5e-08, penalty_start=0)
(Constructor)

source code 

Parameters
----------
l : Non-negative float. The Lagrange multiplier, or regularisation
        constant, of the function.

A : A (usually sparse) array. The linear operator for the Nesterov
        formulation. May not be None!

mu: Non-negative float. The regularisation constant for the smoothing.

penalty_start : Non-negative integer. The number of columns, variables
        etc., to except from penalisation. Equivalently, the first
        index to be penalised. Default is 0, all columns are included.

Overrides: object.__init__

fmu(self, beta, mu=None)

source code 
Returns the smoothed function value.

Parameters
----------
beta : Numpy array. A weight vector.

mu : Non-negative float. The regularisation constant for the smoothing.

phi(self, alpha, beta)

source code 

Function value with known alpha.

Decorators:
  • @abc.abstractmethod

grad(self, beta)

source code 
Gradient of the function at beta.

Parameters
----------
beta : Numpy array. The point at which to evaluate the gradient.

Overrides: Gradient.grad

set_mu(self, mu)

source code 
Set the regularisation constant for the smoothing.

Parameters
----------
mu : Non-negative float. The regularisation constant for the smoothing
        to use from now on.

Returns
-------
old_mu : Non-negative float. The old regularisation constant for the
        smoothing that was overwritten and no longer is used.

alpha(self, beta)

source code 
Dual variable of the Nesterov function.

Parameters
----------
beta : Numpy array (p-by-1). The variable for which to compute the dual
        variable alpha.

lA(self)

source code 

Linear operator of the Nesterov function multiplied by the corresponding Lagrange multipliers.

Specialise this function if you need to. E.g. if you are smoothing a sum of functions with different Lagrange multipliers.

Aa(self, alpha)

source code 
Compute A'*alpha.

Parameters
----------
alpha : List of numpy arrays (x-by-1). The dual variable alpha.

project(self, alpha)

source code 
Projection onto the compact space of the Nesterov function.

Parameters
----------
alpha : List of numpy arrays (x-by-1). The not-yet-projected dual
        variable alpha.

Decorators:
  • @abc.abstractmethod

M(self)

source code 
The maximum value of the regularisation of the dual variable. We
have

    M = max_{alpha in K} 0.5*|alpha|²_2.

Decorators:
  • @abc.abstractmethod

estimate_mu(self, beta)

source code 
Compute a "good" value of mu with respect to the given beta.

Parameters
----------
beta : Numpy array (p-by-1). The primal variable at which to compute a
        feasible value of mu.

lambda_max(self)

source code 

Largest eigenvalue of the corresponding covariance matrix.

From the interface "Eigenvalues".

Overrides: Eigenvalues.lambda_max

L(self)

source code 

Lipschitz constant of the gradient.

From the interface "LipschitzContinuousGradient".

Overrides: LipschitzContinuousGradient.L

prox(self, beta, factor=1.0, eps=5e-08, max_iter=1000)

source code 
The proximal operator corresponding to this function.

The proximal operator is computed numerically. This method should be
overloaded if the function has a known proximal operator.

From the interface "ProximalOperator".

Parameters
----------
beta : Numpy array (p-by-1). The point at which to apply the proximal
        operator.

factor : Positive float. A factor by which the Lagrange multiplier is
        scaled. This is usually the step size.

eps : Positive float. This is the stopping criterion for inexact
        proximal methods, where the proximal operator is approximated
        numerically.

max_iter : Positive integer. This is the maximum number of iterations
        for inexact proximal methods, where the proximal operator is
        approximated numerically.

Overrides: ProximalOperator.prox