Home | Trees | Indices | Help |
|
---|
|
Parameter estimation classes for ODEs.
Robert Clewley.
|
|||
Converged | |||
ConstraintFail | |||
residual_fn_context | |||
residual_fn_context_1D | |||
L2_feature_1D Use with scalar optimizers such as BoundMin |
|||
L2_feature | |||
ParamEst General-purpose parameter estimation class. |
|||
LMpest Unconstrained least-squares parameter and initial condition optimizer for n-dimensional DS trajectories. |
|||
BoundMin Bounded minimization parameter and initial condition optimizer for one-dimensional DS trajectories. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
_seq_types =
|
|||
Tester | |||
test | |||
power = <ufunc 'power'>
|
|||
sign = <ufunc 'sign'>
|
|||
HAVE_PSYCO = True
|
|||
_pest_classes =
|
|||
_deprecated_functions =
|
|||
_ctn_functions =
|
|||
_generic_opt =
|
|||
_utils =
|
|||
_errors =
|
|||
solver_lookup =
|
|||
rout = redirc.Redirector(redirc.STDOUT)
|
|||
rerr = redirc.Redirector(redirc.STDERR)
|
|||
res_fn_lookup =
|
|
Residual vector continuation step in 2D parameter space. orig_dirn corresponds to direction of positive dirn, in case when re-calculating gradient the sign flips |
Residual vector continuation in a single neutral direction in 2D parameter space, given by dirn = +1/-1 from point p0. maxsteps is *per* direction |
Filter features whose residual vectors show a *net* increase (dirn=1) or decrease (dirn=-1) as one parameter is varied. Provided the sensitivities were measured appropriately, dirn=0 will select any non-smoothly changing features (e.g. discrete-valued). feat_sens is a dictionary of feature sensitivities keyed by parameter name, e.g. as returned by the ParamEst.par_sensitivity method. Returns a list of ((model interface, feature), sensitivity) pairs, where the feature belongs to the model interface (in case of duplication in multiple interfaces), and the sensitivity is the absolute value of the net increase/decrease. The lists are ordered by decreasing magnitude of sensitivity. Definition of net increase: e.g. if sensitivity for a given feature with a 3-vector residual is [-0.1 0.4 1.5] then the sum is +1.8 and will be selected for the 'increasing' direction. |
For a given (model interface, feature) pair, find all parameters that change the feature's net residual in the same direction, or not at all. (Provided the sensitivities were measured appropriately, this will select any non-smoothly changing features (e.g. discrete-valued)). feat_sens is a dictionary of feature sensitivities keyed by parameter name, e.g. as returned by the ParamEst.par_sensitivity method. Returns a triple of lists of (parameter names, sensitivity) pairs: increasing, decreasing, and neutral. The lists are ordered by decreasing magnitude of sensitivity. |
Helper function to return whether x is present in list L with an associated sensitivity s larger than thresh, where L is made up of (y, ysens) pairs, provided the sensitivities are larger than threshold. xsf is the triple (x, xsens, feature). rejected and neutral arguments should be lists to store the new rejected and neutral items. |
Default tol > 0 in case there are undifferentiable features that will never lead to satisfaction of constraints with tol=0. Returns a problem object and the by-parameter sensitivity dictionary of derivatives, D. |
Normalize a D_sum by the elements for each feature by smallest absolute size (that element becomes 1 in norm). For unweighted feature sensitivities, or else it unweights weighted ones. |
Create a ParamEst manager object and an instance of an optimizer from the Toolbox.optimize sub-package, returned as a pair. Inputs: pnames: list of free parameters in the model resfnclass: residual function class (e.g. residual_fn_context_1D exported from this module) model: the model to optimize, of type Model (not a Generator) context: the context object that defines the objective function criteria via "model interfaces" and their features, etc. parscales: for models that do not have parameters varying over similar scales, this dictionary defines what "O(1)" change in dynamics refers to for each parameter. E.g. a parameter that must change by several thousand in order to make an O(1) change in model output can have its scale set to 1000. This will also be the maximum step size in that direction for the Scaled Line Search method, if used. Defaults to 10*parseps for each parameter. parseps: dictionary to indicate what change in parameter value to use for forward finite differencing, for reasons similar to those given in description of the parscales argument. Default is 1e-7 for each parameter. parstep: choice of optimization algorithm stepper, defaults to conjugate gradient step.CWConjugateGradientStep. parlinesearch: choice of line search method, defaults to scaled line search method line_search.ScaledLineSearch. stopcriterion: choice of stop criteria for the optimization iterations. Defaults to ftol=1e-7, gtol=1e-7, iterations_max=200. grad_ratio_tol: For residual functions with poor smoothness in some directions, this parameter (default = 10) prevents those directions being used for gradient information if the ratio of residual values found during finite differencing is greater in magnitude than this tolerance value. (Experimental option only -- set very large, e.g. 1e6 to switch off). use_filter: activate use of filtering out largest directions of gradients that may be unreliable. Default is False. (Experimental option only). verbose_level: Default to 2 (high verbosity). |
Restrict parameter estimation to certain features and parameters. If pars is None (default) then all free parameters of pest are used. |
DEPRECATED. Use features - they work more efficiently and robustly. e.g. see Toolbox/neuro_data.py Helper function for qualitative fitting. Local slope information about data array x. Values of 1 in the return array indicate increasing slopes over a local extent given by the the lookahead argument, whereas 0 indicates non-increasing slopes. The default value specifies the value taken by the returned array in the indices from len(x)-lookahead to len(x). |
DEPRECATED. Use features - they work more efficiently and robustly. e.g. see Toolbox/neuro_data.py Helper function for qualitative fitting. per is an estimate of the period, per <= tmax. pertol_frac is fraction of period used as tolerance for finding extrema. fit_fn_class switches on interpolation of extremum by the fitting of a local function (uses least squares criterion) - specify a sub-class of fit_function (default None). |
Helper function for qualitative fitting of extrema using least squares. This function returns the variable values at the extrema, unlike the related function get_extrema (for data). per is an estimate of the period, per <= tmax. pertol_frac is fraction of period used as tolerance for finding extrema. |
|
_seq_types
|
_pest_classes
|
_deprecated_functions
|
_utils
|
solver_lookup
|
res_fn_lookup
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Dec 2 23:44:18 2012 | http://epydoc.sourceforge.net |