Package park :: Package fitting :: Module fitresult :: Class FitController

Class FitController

source code


Operations required to support functionality of GA refl.
Instance Methods
 
__init__(self, pars)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
set_bounds(self, p, range)
Reset the bounds on parameter p.
source code
 
scramble(self, p)
Reset the fit population so that parameter p varies uniformly within its range.
source code
 
localopt(self, p=None, optimizer=None)
Run a local optimizer at point p.
source code
 
suggest(self, p)
Introduce an individual to the fit population.
source code
 
lamarkian(self, p=None, optimizer=None)
Lamarkian evolution.
source code
 
attract(self, p, sigma=0.1)
Search near p.
source code
 
repel(self, p, I=1, sigma=0.1)
Avoid p.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

__init__(self, pars)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

set_bounds(self, p, range)

source code 

Reset the bounds on parameter p.

Range can be::
None: let p vary in (-inf,inf) value: fix p at the value (low,high): vary p in range (low,high)

scramble(self, p)

source code 

Reset the fit population so that parameter p varies uniformly within its range.

This is not a sensible option for all optimizers.

localopt(self, p=None, optimizer=None)

source code 

Run a local optimizer at point p.

The result will be sent to the FitMonitor. The user may opt to introduce this new individual back into the fit population.

If no p is given, then run from the best current value in the fit.

If no optimizer is given, then run a quasi-Newton optimizer such as secant or dog-leg for functions without derivatives or tnc for functions with derivatives.

Note: it is theoretically possible to split the minimization into D0 and D1 portions, using different algorithms for each.

suggest(self, p)

source code 

Introduce an individual to the fit population.

The suggested value may come from a local optimization from point p or from the user playing with the parameters in the foreground while the global optimization is running in the background.

lamarkian(self, p=None, optimizer=None)

source code 

Lamarkian evolution.

Improve the fittest individual in the population using a local optimizer and reintroduce it into the population. This strategy is meaningful for a number of the stochastic optimizers including simulated annealing since it allows the user to control the goal directed behaviour.

This is a server-side combination of localopt and suggest, without the need to cycle the results through FitMonitor.

attract(self, p, sigma=0.1)

source code 

Search near p.

Sigma is the size of the attractor relative to the entire search space.

This is a user supplied heuristic telling the stochastic search to prefer to look near point p when proposing new members of the population. This will not affect the calculated objective value

The attractor translates into a scaled gaussian peak.

repel(self, p, I=1, sigma=0.1)

source code 

Avoid p. Avoid a particular region of the fit space when choosing new individuals in the population.

Having identified a bad local optimum in the fit space, have the stochastic optimizers avoid the this region using a penalty function based