Trees | Indices | Help |
|
---|
|
This module is a Levenberg-Marquardt optimizer with stem-size control for numeric differentiation. It just needs a function that produces residuals. It is multi-threaded, so calculations of residuals can be farmed out to many processors.
UPDATED 12/2009 GPK: NOT TESTED!
Classes | |
OptError | |
NoDownhill | |
NoDerivative | |
BadParamError Raised when you give and opt instance some invalid control parameter. |
|
BadResult The function to be optimized returns some illegal result. |
|
mysem This is a semaphore that is automatically released when it is de-allocated. |
|
semclass This is a semaphore to control the number of simultaneous computations. |
|
prms This class records parameters and caches function evaluations. |
|
LockedList | |
opt A class that implements a optimizer. |
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Variables | |
__package__ =
|
Imports: os, sys, math, random, traceback, threading, die, avio, gpkmisc, Num, RA, LA
Function Details |
This shows how important different measurements are to the final derivitive estimate. The weight must be small when the change of a parameter is smaller than the quantum (i.e. when r_delta < quantum). It must also be small when the change in z is much larger than T (r_dz>>1). It is largest when r_dz is about 1. |
Given a list of (delta, z) in a differentiation, pick one more point that makes the differentiation more symmetric. This is done by picking a new delta that brings sum{delta_i * wtf()} closer to zero, where wtf() is the weight given to each point in the differentiation. |
Given a list of (delta, z) tuples in a differentiation attempt, find another delta that (a) fills a gap in the sequence, (b) is preferably has a sign opposite most of the {delta} values, and (c) has a large wtf(). Points outside the sequence are also considered. |
Differentiate z with respect to parameter i. We enter this function with the semaphore 'sem' already acquired. |
Generate a linear constraint to be added onto a list and passed to linear_constraint(). This constraint expresses that p[param]>=min. |
Generate a linear constraint to be added onto a list and passed to linear_constraint(). This constraint expresses that p[param]<=max. |
This constrains a step to lie inside a region bounded by a list_of_constraints.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Sep 22 04:25:02 2011 | http://epydoc.sourceforge.net |