Package PyDSTool :: Package Toolbox :: Module ParamEst :: Class LMpest
[hide private]
[frames] | no frames]

Class LMpest

source code

    object --+        
             |        
common.Utility --+    
                 |    
          ParamEst --+
                     |
                    LMpest

Unconstrained least-squares parameter and initial condition optimizer for n-dimensional DS trajectories. Fits N-dimensional parameter spaces.

Uses MINPACK Levenberg-Marquardt algorithm wrapper from SciPy.minimize.

Instance Methods [hide private]
 
setAlgParams(self, changed_parDict=None)
Set algorithmic parameters.
source code
 
run(self, parDict=None, extra_pars=None, verbose=False)
Begin parameter estimation run.
source code
 
_make_res_float(self, pars)
Returns a function that converts residual vector to its norm (a single floating point total residual).
source code
 
gradient_total_residual(self, x, eps=None, pars=None, use_ridder=False)
Compute gradient of total residual (norm of the residual function) at x as a function of parameter names specified (defaults to all free parameters).
source code
 
Hessian_total_residual(self, x, eps_inner=None, eps_outer=None, pars=None, use_ridder_inner=False, use_ridder_outer=False)
Compute Hessian of total residual (norm of the residual function) at x as a function of parameter names specified (defaults to all free parameters), USING FINITE DIFFERENCES.
source code

Inherited from ParamEst: __init__, evaluate, find_logs, iterate, key_logged_residual, par_sensitivity, pars_array_to_dict, pars_dict_to_array, pars_to_ixs, resetParArgs, reset_log, setFn, show_log_record, weighted_par_sensitivity

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setAlgParams(self, changed_parDict=None)

source code 

Set algorithmic parameters.

Overrides: ParamEst.setAlgParams
(inherited documentation)

run(self, parDict=None, extra_pars=None, verbose=False)

source code 

Begin parameter estimation run.

parDict can include arbitrary additional runtime arguments to the residual function.

If tmesh is not supplied an attempt will be made to create one from the goal trajectory's independent domain limits, if the trajectory has been provided. Default mesh resolution is 20 points.

Overrides: ParamEst.run

_make_res_float(self, pars)

source code 

Returns a function that converts residual vector to its norm (a single floating point total residual).

(Helper method for gradient and Hessian)

Hessian_total_residual(self, x, eps_inner=None, eps_outer=None, pars=None, use_ridder_inner=False, use_ridder_outer=False)

source code 

Compute Hessian of total residual (norm of the residual function) at x as a function of parameter names specified (defaults to all free parameters), USING FINITE DIFFERENCES.

Option to use different eps scalings for the inner gradient calculations versus the outer gradient of those values.

It might be more accurate to calculate the Hessian using a QR decomposition of the Jacobian.