Package parsimony :: Package functions :: Module penalties :: Class QuadraticConstraint
[hide private]
[frames] | no frames]

Class QuadraticConstraint

source code

           object --+        
                    |        
  properties.Function --+    
                        |    
properties.AtomicFunction --+
                            |
               object --+   |
                        |   |
      properties.Gradient --+
                            |
               object --+   |
                        |   |
       properties.Penalty --+
                            |
               object --+   |
                        |   |
    properties.Constraint --+
                            |
                           QuadraticConstraint
Known Subclasses:

The proximal operator of the quadratic function

    f(x) = l * (x'Mx - c),

or

    f(x) = l * (x'M'Nx - c),

where M or M'N is a given symmatric positive-definite matrix. The
constrained version has the form

    x'Mx <= c,

or

    x'M'Nx <= c

if two matrices are given.

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

c : Float. The limit of the constraint. The function is feasible if
        x'Mx <= c. The default value is c=0, i.e. the default is a
        regularisation formulation.

M : Numpy array. The given positive definite matrix. It is assumed that
        the first penalty_start columns must be excluded.

N : Numpy array. The second matrix if the factors of the positive-definite
        matrix are given. It is assumed that the first penalty_start
        columns must be excluded.

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

Instance Methods [hide private]
 
__init__(self, l=1.0, c=0.0, M=None, N=None, penalty_start=0)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
f(self, beta)
Function value.
source code
 
grad(self, beta)
Gradient of the function.
source code
 
feasible(self, beta)
Feasibility of the constraint.
source code

Inherited from properties.Function: get_params, reset, set_params

Inherited from properties.Gradient: approx_grad

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.AtomicFunction: __metaclass__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, l=1.0, c=0.0, M=None, N=None, penalty_start=0)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

f(self, beta)

source code 

Function value.

Overrides: properties.Function.f

grad(self, beta)

source code 

Gradient of the function.

From the interface "Gradient".

Overrides: properties.Gradient.grad

feasible(self, beta)

source code 

Feasibility of the constraint.

From the interface "Constraint".

Overrides: properties.Constraint.feasible