Package parsimony :: Package functions :: Module combinedfunctions :: Class LinearRegressionL2SmoothedL1TV
[hide private]
[frames] | no frames]

Class LinearRegressionL2SmoothedL1TV

source code

                            object --+        
                                     |        
                   properties.Function --+    
                                         |    
              properties.CompositeFunction --+
                                             |
                            object --+       |
                                     |       |
                   properties.Gradient --+   |
                                         |   |
                            object --+   |   |
                                     |   |   |
properties.LipschitzContinuousGradient --+   |
                                         |   |
                            object --+   |   |
                                     |   |   |
                properties.Eigenvalues --+   |
                                         |   |
                            object --+   |   |
                                     |   |   |
           properties.ProximalOperator --+   |
                                         |   |
               properties.NesterovFunction --+
                                             |
                                object --+   |
                                         |   |
                    properties.GradientMap --+
                                             |
                                object --+   |
                                         |   |
                   properties.DualFunction --+
                                             |
                                object --+   |
                                         |   |
                 properties.StronglyConvex --+
                                             |
                                            LinearRegressionL2SmoothedL1TV

Combination (sum) of Linear Regression, L2 and simultaneously smoothed
L1 and TotalVariation.

Parameters
----------
X : Numpy array. The X matrix for the ridge regression.

y : Numpy array. The y vector for the ridge regression.

l2 : Non-negative float. The Lagrange multiplier, or regularisation
        constant, for the ridge (L2) penalty.

l1 : Non-negative float. The Lagrange multiplier, or regularisation
        constant, for the L1 penalty.

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

A : A list or tuple with 4 elements of (usually sparse) arrays. The linear
        operator for the smoothed L1+TV. The first element must be the
        linear operator for L1 and the following three for TV. 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.

mean : Boolean. Whether to compute the squared loss or the mean squared
        loss. Default is True, the mean squared loss.

Instance Methods [hide private]
 
__init__(self, X, y, l2, l1, tv, A=None, mu=5e-08, penalty_start=0, mean=True)
Parameters ---------- l : Non-negative float.
source code
 
reset(self)
Free any cached computations from previous use of this Function.
source code
 
set_params(self, **kwargs) source code
 
get_mu(self)
Returns the regularisation constant for the smoothing.
source code
 
set_mu(self, mu)
Sets the regularisation constant for the smoothing.
source code
 
f(self, beta)
Function value.
source code
 
phi(self, alpha, beta)
Function value.
source code
 
A(self)
Linear operator of the Nesterov function.
source code
 
L(self)
Lipschitz constant of the gradient.
source code
 
parameter(self)
Returns the strongly convex parameter for the function.
source code
 
V(self, alpha, beta, L)
The gradient map associated to the function.
source code
 
alpha(self, beta)
Dual variable of the Nesterov function.
source code
 
betahat(self, alpha, beta=None)
Returns the beta that minimises the dual function.
source code
 
gap(self, beta, beta_hat)
Compute the duality gap.
source code
 
estimate_mu(self, beta)
Computes a "good" value of mu with respect to the given beta.
source code
 
M(self)
The maximum value of the regularisation of the dual variable.
source code
 
project(self, a)
Projection onto the compact space of the Nesterov function.
source code

Inherited from properties.Function: get_params

Inherited from properties.NesterovFunction: Aa, fmu, grad, lA, lambda_max, prox

Inherited from properties.Gradient: approx_grad

Inherited from properties.LipschitzContinuousGradient: approx_L

Inherited from properties.Eigenvalues: lambda_min

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

Class Variables [hide private]
  __abstractmethods__ = frozenset([])

Inherited from properties.CompositeFunction: __metaclass__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, X, y, l2, l1, tv, A=None, mu=5e-08, penalty_start=0, mean=True)
(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__
(inherited documentation)

reset(self)

source code 

Free any cached computations from previous use of this Function.

Overrides: properties.Function.reset
(inherited documentation)

set_params(self, **kwargs)

source code 
Overrides: properties.Function.set_params

get_mu(self)

source code 

Returns the regularisation constant for the smoothing.

From the interface "NesterovFunction".

Overrides: properties.NesterovFunction.get_mu

set_mu(self, mu)

source code 
Sets the regularisation constant for the smoothing.

From the interface "NesterovFunction".

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 is no longer used.

Overrides: properties.NesterovFunction.set_mu

f(self, beta)

source code 

Function value.

Overrides: properties.Function.f

phi(self, alpha, beta)

source code 

Function value.

Overrides: properties.NesterovFunction.phi

A(self)

source code 

Linear operator of the Nesterov function.

Overrides: properties.NesterovFunction.A
(inherited documentation)

L(self)

source code 

Lipschitz constant of the gradient.

From the interface "LipschitzContinuousGradient".

Overrides: properties.LipschitzContinuousGradient.L

parameter(self)

source code 

Returns the strongly convex parameter for the function.

From the interface "StronglyConvex".

Overrides: properties.StronglyConvex.parameter

V(self, alpha, beta, L)

source code 

The gradient map associated to the function.

From the interface "GradientMap".

Overrides: properties.GradientMap.V

alpha(self, beta)

source code 

Dual variable of the Nesterov function.

From the interface "NesterovFunction".

Overrides: properties.NesterovFunction.alpha

betahat(self, alpha, beta=None)

source code 

Returns the beta that minimises the dual function.

From the interface "DualFunction".

Overrides: properties.DualFunction.betahat

gap(self, beta, beta_hat)

source code 

Compute the duality gap.

From the interface "DualFunction".

Overrides: properties.DualFunction.gap

estimate_mu(self, beta)

source code 

Computes a "good" value of mu with respect to the given beta.

From the interface "NesterovFunction".

Overrides: properties.NesterovFunction.estimate_mu

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.

From the interface "NesterovFunction".

Overrides: properties.NesterovFunction.M

project(self, a)

source code 

Projection onto the compact space of the Nesterov function.

From the interface "NesterovFunction".

Overrides: properties.NesterovFunction.project