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

Class ParamEst

source code

    object --+    
             |    
common.Utility --+
                 |
                ParamEst
Known Subclasses:

General-purpose parameter estimation class. freeParams keyword initialization argument may be a list of names or a dictionary of scales for determining appropriate step sizes for O(1) changes in the residual function.

In its absence, the scales will default to 1.

Instance Methods [hide private]
 
__init__(self, **kw)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
resetParArgs(self) source code
 
setAlgParams(self, *args)
Set algorithmic parameters.
source code
 
setFn(self, fn) source code
 
evaluate(self, extra_record_info=None)
Evaluate residual vector, record result, and display step information (if verbose).
source code
 
reset_log(self) source code
 
key_logged_residual(self, pars_ics, weights)
pars_ics must be a sequence type
source code
 
find_logs(self, res_val=None, condition='<')
Find log entries matching given condition on their residual norm values.
source code
 
show_log_record(self, i, full=False)
Use full option to show residuals mapped to their feature names, including information about weights.
source code
 
pars_to_ixs(self) source code
 
pars_array_to_dict(self, parray) source code
 
pars_dict_to_array(self, pdict) source code
 
par_sensitivity(self, pdict=None, non_diff_feats=None, extra_info=False)
Parameter sensitivity of the context's features at the free parameter values given as a dictionary or args.
source code
 
weighted_par_sensitivity(self, feat_sens)
Return parameter sensitivities weighted according to current feature weights, based on a previous output from par_sensitivity method.
source code
 
run(self)
Run parameter estimation.
source code
 
iterate(self) 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, **kw)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

find_logs(self, res_val=None, condition='<')

source code 

Find log entries matching given condition on their residual norm values. Returns a list of log indices.

if res_val is not given, the residual norm of the first entry in the current log is used.

Use '<' and '>' for the condition argument (default is <).

par_sensitivity(self, pdict=None, non_diff_feats=None, extra_info=False)

source code 
Parameter sensitivity of the context's features at the free parameter
values given as a dictionary or args. If none provided, the current
test model parameter values will be used. A dictionary mapping parameter names to
  {interface_instance: {feat1: sensitivity_array, ..., featn: sensitivity_array}}
is returned.

Specify any non-differentiable features in the non_diff_feats list
as pairs (interface instance, feature instance).

Sensitivity entry > 0 means that increasing the parameter will
increase the absolute value of that residual, i.e. worsen the "fit".

extra_info optional argument makes this method return both the feature sensitivity
dictionary and a dictionary containing additional information to reconstruct
the gradient of the residual norm, to save re-calculation of it at this point.
This gradient will also respect the non_diff_feats argument, if provided.

run(self)

source code 

Run parameter estimation. Returns a dictionary:

'success' -> boolean 'pars_sol' -> fitted values of pars 'pars_orig' -> original values of optimized pars 'sys_sol' -> trajectory of best fit Model trajectory 'alg_results' -> all other algorithm information (list)