utils#

This module implements some helpful utilities.

Termination criteria#

termination.energy_tol_term

Check if the energy is below a certain tolerance.

termination.diff_tol_term

Checks if the update difference is less than the difference tolerance.

termination.max_eval_term

Check if the number of function evaluations is greater than or equal to the maximum number of evaluations.

termination.max_it_term

Checks if the current value of dyn.it is greater than or equal to the value of dyn.max_it.

termination.max_time_term

Checks if the current value of dyn is greater than or equal to the value of dyn.max_time.

Resampling schemes#

resampling.resampling

Resamplings from a list of callables

resampling.ensemble_update_resampling

Resampling based on ensemble update difference

resampling.loss_update_resampling

Resampling based on loss update difference

History#

history.track

Base class for tracking of variables in the history dictionary of given dynamics.

history.track_x

Class for tracking of variable 'x' in the history dictionary.

history.track_energy

Class for tracking the 'energy' entry in the history.

history.track_update_norm

Class for tracking the 'update_norm' entry in the history.

history.track_consensus

Class for tracking the 'consensus' entry in the dynamic.

history.track_drift

Class for tracking the 'drift' entry in the history.

history.track_drift_mean

Class for tracking the 'drift_mean' entry in the history.

Particle initialization#

particle_init.init_particles

Initialize particles

Objective Handling#

objective_handling.cbx_objective

objective_handling.cbx_objective_fh

Creates a cbx_objective from a function handle.

objective_handling.cbx_objective_f1D

objective_handling.cbx_objective_f2D

A class for handling 2D objective functions.