Package parsimony :: Package functions :: Package multiblock :: Module losses :: Class MultiblockFunctionWrapper
[hide private]
[frames] | no frames]

Class MultiblockFunctionWrapper

source code

              object --+        
                       |        
     properties.Function --+    
                           |    
properties.CompositeFunction --+
                               |
                  object --+   |
                           |   |
         properties.Gradient --+
                               |
                  object --+   |
                           |   |
         properties.StepSize --+
                               |
                  object --+   |
                           |   |
 properties.ProximalOperator --+
                               |
                              MultiblockFunctionWrapper
Known Subclasses:

Instance Methods [hide private]
 
__init__(self, function, w, index)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
f(self, w)
Function value.
source code
 
grad(self, w)
Gradient of the function.
source code
 
prox(self, w, factor=1.0, eps=5e-08, max_iter=100)
The proximal operator corresponding to the function.
source code
 
step(self, w, index=0)
The step size to use in descent methods.
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([])
  _abc_negative_cache_version = 14

Inherited from properties.CompositeFunction: __metaclass__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, function, w, index)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

f(self, w)

source code 
Function value.

From the interface "Function".

Parameters
----------
w : Numpy array (p-by-1). The point at which to evaluate the function.

Overrides: properties.Function.f

grad(self, w)

source code 
Gradient of the function.

Parameters
----------
w : Numpy array (p-by-1). The point at which to evaluate the gradient.

Overrides: properties.Gradient.grad

prox(self, w, factor=1.0, eps=5e-08, max_iter=100)

source code 
The proximal operator corresponding to the function.

Parameters
----------
w : 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.

Overrides: properties.ProximalOperator.prox

step(self, w, index=0)

source code 
The step size to use in descent methods.

Parameters
----------
w : Numpy array. The point at which to determine the step size.

Overrides: properties.StepSize.step