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

Class Gradient

source code

object --+
         |
        Gradient
Known Subclasses:

Nested Classes [hide private]
  __metaclass__
Metaclass for defining Abstract Base Classes (ABCs).
Instance Methods [hide private]
 
grad(self, beta)
Gradient of the function.
source code
 
approx_grad(self, x, 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 0x30d82d0>
  _abc_negative_cache = <_weakrefset.WeakSet object at 0x30d8350>
  _abc_negative_cache_version = 10
  _abc_registry = <_weakrefset.WeakSet object at 0x30d8210>
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

grad(self, beta)

source code 
Gradient of the function.

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

Decorators:
  • @abc.abstractmethod

approx_grad(self, x, eps=0.0001)

source code 
Numerical approximation of the gradient.

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

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