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

Class L1L2Squared

source code

             object --+        
                      |        
    properties.Function --+    
                          |    
  properties.AtomicFunction --+
                              |
                 object --+   |
                          |   |
         properties.Penalty --+
                              |
                 object --+   |
                          |   |
properties.ProximalOperator --+
                              |
                             L1L2Squared

The proximal operator of the L1 function with an L2 constraint.
The function is

    f(x) = l1 * ||x||_1 + Indicator(||x||²_2 <= l2),

where ||.||_1 is the L1 norm and ||.||²_2 is the squared L2 norm.

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

l2 : Non-negative float. The limit of the constraint of of the squared L2
        norm penalty.

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, l1=1.0, l2=1.0, penalty_start=0)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
f(self, beta)
Function value.
source code
 
prox(self, beta, factor=1.0, **kwargs)
The corresponding proximal operator.
source code

Inherited from properties.Function: get_params, reset, set_params

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, l1=1.0, l2=1.0, 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

prox(self, beta, factor=1.0, **kwargs)

source code 

The corresponding proximal operator.

From the interface "ProximalOperator".

Overrides: properties.ProximalOperator.prox