CBO

class gob.optimizers.CBO.CBO(bounds, n_particles=200, iter=1000, dt=0.01, lam=1, epsilon=0.01, beta=1, sigma=5.1, alpha=1, batch_size=0, verbose=False)

Bases: Optimizer

Interface for the CBO optimizer.

Parameters:
  • bounds (ndarray) – The bounds of the search space.

  • n_particles (int) – The number of particles.

  • iter (int) – The number of iterations.

  • dt (float) – The time step.

  • lam (float) – The attraction parameter.

  • epsilon (float) – The smooth-heaviside parameter.

  • beta (float) – The inverse temperature.

  • sigma (float) – The standard deviation of the Gaussian noise.

  • alpha (float) – The coefficient to decrease the step size.

  • batch_size (int) – The batch size for the mini-batch optimization. If 0, no mini-batch optimization is used.

  • verbose (bool) – Whether to print information about the optimization process.

minimize(f)

Minimize a function using the optimizer.

Parameters:

f (Function) – The objective function.

Returns:

The minimum point and the minimum value.

Return type:

pair

set_stop_criterion(stop_criterion)

Set a stop criterion for the optimizer.

Parameters:

stop_criterion (float) – The stop criterion.