Home | Trees | Indices | Help |
|
---|
|
A Model object connects a set of experimental data with the objects used to model that data. Most importantly, a Model can calculate a cost for a given set of parameters, characterizing how well those parameters fit the data contained within the model.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
dictionary |
|
||
dictionary |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
dictionary |
|
||
|
|||
|
|||
|
|||
dictionary |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
imag_cutoff = 1e-8
|
|
expts A sequence of Experiments to be fit to. calcs A sequence of calculation objects referred to by the Experiments. |
Get the initial conditions currently present in a model for dynamic variables that are not assigned variables. Outputs: KeyedList with keys (calcName,varName) --> initialValue |
Sets the initial conditions into the model. Uses the input format defined by 'getICs'. Inputs: ics -- Initial conditions to set in KeyedList form: keys: (calcName, varName) --> intialValue Outputs: None |
Evaluate the cost for the model, returning the intermediate residuals, and chi-squared. (Summing up the residuals is a negligible amount of work. This arrangment makes notification of observers much simpler.) |
Return chi-squared divided by the number of degrees of freedom Question: Are priors to be included in the N data points? How do scale factors change the number of d.o.f.? |
Force(parameters, epsilon factor) -> list Returns a list containing the numerical gradient of the cost with respect to each parameter (in the parameter order of the CalculationCollection). Each element of the gradient is: cost(param + eps) - cost(param - eps)/(2 * eps). If relativeScale is False then epsf is the stepsize used (it should already be multiplied by typicalValues before Jacobian is called) If relativeScale is True then epsf is multiplied by params. The two previous statements hold for both scalar and vector valued epsf. |
Return the gradient of the cost, d_cost/d_param as a KeyedList. This method uses sensitivity integration, so it only applies to ReactionNetworks. |
Return the gradient of the cost wrt log parameters, d_cost/d_log_param as a KeyedList. This method uses sensitivity integration, so it only applies to ReactionNetworks. |
Gets a dictionary of measured independent variables indexed by calculation from the ExperimentCollection and passes it to the CalculationCollection. The returned dictionary is of the form: dictionary[experiment][calculation][dependent variable] [independent variabled] -> calculated value.
|
Gets a dictionary of measured independent variables indexed by calculation from the ExperimentCollection and passes it to the CalculationCollection. The returned dictionary is of the form: dictionary[experiment][calculation][dependent variable] [independent variabled][parameter] -> sensitivity.
|
Compute the scale factors for the current parameters and return a dict. The dictionary is of the form dict[exptId][varId] = scale_factor |
Returns the scale factor derivatives w.r.t. parameters appropriate for each chemical in each experiment, given the current parameters. The returned dictionary is of the form: internalVarsDerivs['scaleFactors'] = dict[experiment][chemical][parametername] -> derivative.
|
Return a KeyedList of the derivatives of the model residuals w.r.t. the lograithms of the parameters parameters. The method uses the sensitivity integration. As such, it will only work with ReactionNetworks. The KeyedList is of the form: kl.get(resId) = [dres/dlogp1, dres/dlogp2...] |
Return a KeyedList of the derivatives of the model residuals w.r.t. parameters. The method uses the sensitivity integration. As such, it will only work with ReactionNetworks. The KeyedList is of the form: kl[resId] = [dres/dp1, dres/dp2...] |
Return a KeyedList of the derivatives of the model residuals w.r.t. parameters. The method uses finite differences. Inputs: params -- Parameters about which to calculate the jacobian eps -- Step size to take, may be vector or scalar. relativeScale -- If true, the eps is taken to be the fractional change in parameter to use in finite differences. stepSizeCutoff -- Minimum step size to take. |
Gets a dictionary of the sensitivities at the time points of the independent variables for the measured dependent variables for each calculation and experiment. Form: dictionary[(experiment,calculation,dependent variable, independent variable)] -> result result is a vector of length number of parameters containing the sensitivity at that time point, in the order of the ordered parameters
|
Finite difference the residual dictionary to get a dictionary for the Jacobian. It will be indexed the same as the residuals. Note: epsf is either a scalar or an array. If relativeScale is False then epsf is the stepsize used (it should already be multiplied by typicalValues before Jacobian is called) If relativeScale is True then epsf is multiplied by params. The two previous statements hold for both scalar and vector valued epsf. |
Return the second partial derivative for func w.r.t. parameters i and j f0: The value of the function at params eps: Sets the stepsize to try relativeScale: If True, step i is of size p[i] * eps, otherwise it is eps stepSizeCutoff: The minimum stepsize to take |
Returns the hessian of the model. epsf: Sets the stepsize to try relativeScale: If True, step i is of size p[i] * eps, otherwise it is eps stepSizeCutoff: The minimum stepsize to take jacobian: If the jacobian is passed, it will be used to estimate the step size to take. vebose: If True, a message will be printed with each hessian element calculated |
Returns the hessian of the model in log parameters. eps: Sets the stepsize to try relativeScale: If True, step i is of size p[i] * eps, otherwise it is eps stepSizeCutoff: The minimum stepsize to take vebose: If True, a message will be printed with each hessian element calculated |
Finite difference the residual dictionary to get a dictionary for the Hessian. It will be indexed the same as the residuals. Note: epsf is either a scalar or an array. If relativeScale is False then epsf is the stepsize used (it should already be multiplied by typicalValues before Jacobian is called) If relativeScale is True then epsf is multiplied by params. The two previous statements hold for both scalar and vector valued epsf. |
Calculate the Residual Response array. This array represents the change in a residual obtained by a finite change in a data value. Inputs: (self, j, h) j -- jacobian matrix to use h -- hessian matrix to use Outputs: response -- The response array |
Calculate the parameter response to residual array. This array represents the change in parameter resulting from a change in data (residual). Inputs: (self, j, h) j -- jacobian matrix to use h -- hessian matrix to use Outputs: response -- The response array |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Jun 3 10:15:00 2009 | http://epydoc.sourceforge.net |