| Home | Trees | Indices | Help |
|
|---|
|
|
Abstract interface to the fitness function for the park minimizer classes.
Park provides a specific implementation park.assembly.Assembly.
TODO: add a results() method to return model specific info to the TODO: fit handler.
| Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
| Properties | |
|
Inherited from |
| Method Details |
Do the necessary work to prepare to run the objective function, such as loading large files and precalculating data structures. This is called before before retrieving the fit parameters and running the fit. |
Returns a list of fit parameters. Each parameter has a name, an initial value and a range. See park.fitresult.FitParameter for an example. On each function evaluation a new parameter set will be passed to the fitter, with values in the same order as the list of parameters. |
Returns the objective value when evaluated at point p in R^n. The default is sumsq residuals. |
Returns the derivative wrt the p at point p in R^n. Numeric derivatives are calculated based on step, where step is the portion of the total range for parameter j, or the portion of point value p_j if the range on parameter j is infinite. |
Return the covariance matrix at p cov(f,p) = inv(J'J) where J is the Jacobian matrix [df(xi)/dpj] Using the singular value decomposition we have:
J = U S V'
J'J = (U S V')' (U S V')
= V S' U' U S V'
= V S S V'
inv(J'J) = inv(V S S V')
= inv(V') inv(S S) inv(V)
= V inv (S S) V'
Note that this function hangs unexpectedly for some versions of numpy on Windows. Please make sure you are using the latest version. |
Return parameter uncertainty. This is just the sqrt diagonal of covariance matrix inv(J'J) at point p. |
Some fitters, notably Levenberg-Marquardt, operate directly on the residuals vector. If the individual residuals are not available, then LM cannot be used. This method is optional. |
Returns residuals and derivatives with respect to the given parameters. If these are unavailable in the model, then they can be approximated by numerical derivatives, though it is generally better to use a derivative free optimizer such as coliny or cobyla which can use the function evaluations more efficiently. In any case, your objective function is responsible for calculating these. This method is optional. |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Mar 16 15:03:56 2009 | http://epydoc.sourceforge.net |