Skip to content

smcopt⚓︎

Stochastic Monte-Carlo optimisation.

SmcOpt ⚓︎

Bases: Optimize

TODO: Write docstring ala EnOpt

__init__(fun, x, args, sens, bounds=None, **options) ⚓︎

Parameters:

Name Type Description Default
fun callable

objective function

required
x ndarray

Initial state

required
sens callable

Ensemble sensitivity

required
bounds list

(min, max) pairs for each element in x. None is used to specify no bound.

None
options dict

Optimization options

  • maxiter: maximum number of iterations (default 10)
  • restart: restart optimization from a restart file (default false)
  • restartsave: save a restart file after each successful iteration (defalut false)
  • tol: convergence tolerance for the objective function (default 1e-6)
  • alpha: weight between previous and new step (default 0.1)
  • alpha_maxiter: maximum number of backtracing trials (default 5)
  • resample: number indicating how many times resampling is tried if no improvement is found
  • cov_factor: factor used to shrink the covariance for each resampling trial (defalut 0.5)
  • inflation_factor: term used to weight down prior influence (defalult 1)
  • survival_factor: fraction of surviving samples
  • savedata: specify which class variables to save to the result files (state, objective function value, iteration number, number of function evaluations, and number of gradient evaluations, are always saved)
{}

calc_update() ⚓︎

Update using sequential monte carlo method