cbx.dynamics.CBS#

class cbx.dynamics.CBS(f, mode='sampling', noise='covariance', M=1, track_args=None, **kwargs)[source]#

Bases: CBO

optimize(sched='default')[source]#

Optimize the function using the dynmaic. This function perfoms the iterations as specified by step method and the update in inner_step().

Parameters:
  • print_int – int, optional The interval at which to print the current state of the optimization. If not provided, the default value is used. Defaults to None.

  • sched – str The scheduler to use for the optimization. If set to ‘default’, the default scheduler is used. If set to None, a scheduler is created based on the current optimization parameters. Defaults to ‘default’.

Returns:

The best particle found during the optimization process.

Return type:

best_particle

default_sched()[source]#

A function that returns a default scheduler.

Parameters:

None

Returns:

The scheduler object.

Return type:

scheduler