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

Class MultiblockGradient

source code

object --+
         |
        MultiblockGradient
Known Subclasses:

Nested Classes [hide private]
  __metaclass__
Metaclass for defining Abstract Base Classes (ABCs).
Instance Methods [hide private]
 
grad(self, x, index)
Gradient of the function.
source code
 
approx_grad(self, x, index, eps=0.0001)
Numerical approximation of the gradient.
source code

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

Class Variables [hide private]
  __abstractmethods__ = frozenset(['grad'])
  _abc_cache = <_weakrefset.WeakSet object at 0x318a3d0>
  _abc_negative_cache = <_weakrefset.WeakSet object at 0x318a450>
  _abc_negative_cache_version = 10
  _abc_registry = <_weakrefset.WeakSet object at 0x318a310>
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

grad(self, x, index)

source code 
Gradient of the function.

Parameters
----------
x : List of numpy arrays. The weight vectors, x[index] is the point at
        which to evaluate the gradient.

index : Non-negative integer. Which variable the gradient is for.

Decorators:
  • @abc.abstractmethod

approx_grad(self, x, index, eps=0.0001)

source code 
Numerical approximation of the gradient.

Parameters
----------
x : List of numpy arrays. The weight vectors, x[index] is the point at
        which to evaluate the gradient.

index : Non-negative integer. Which variable the gradient is for.

eps : Positive integer. The precision of the numerical solution.
        Smaller is better, but too small may result in floating point
        precision errors.