cbx.utils.resampling.loss_update_resampling#

class cbx.utils.resampling.loss_update_resampling(wait_thresh=5)[source]#

Bases: object

Resampling based on loss update difference

Parameters:
  • M (int) – The number of runs in the dynamic object the resampling is applied to.

  • wait_thresh (int) – The number of iterations to wait before resampling. The default is 5. If the best loss is not updated after the specified number of iterations, the ensemble is resampled.

Return type:

The indices of the runs to resample as a numpy array.

__call__(dyn)[source]#

Call self as a function.