Package PyDSTool :: Package Toolbox :: Package optimizers :: Package helpers :: Module finite_difference :: Class FiniteDifferencesCache
[hide private]
[frames] | no frames]

Class FiniteDifferencesCache

source code

               object --+    
                        |    
FiniteDifferencesFunction --+
                            |
                           FiniteDifferencesCache
Known Subclasses:

General class for recognition by ParamEst as a function with a non-explicit derivative. Uses a cache to save recomputation of most recent values.

Instance Methods [hide private]
 
__call__(self, params) source code
 
__init__(self, eps=1e-07, *args, **kwargs)
Creates the function :...
source code
 
residual(self, p, extra_args=None) source code
 
_res_fn(self, p, extra_args=None) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, eps=1e-07, *args, **kwargs)
(Constructor)

source code 

Creates the function :
- eps is the scale at which the function varies by O(1) in each
parameter direction
- grad_ratio_tol (optional, default = 10) is the relative change in any direction
after which the function is deemed to have changed non-smoothly, so that gradient in
that direction will be ignored this step

Overrides: object.__init__

residual(self, p, extra_args=None)

source code 
Overrides: FiniteDifferencesFunction.residual