PSO_optimizer.minimize

PSO_optimizer.minimize(f_swarm: callable, **kwargs) optim_results[source]

Perform a Particle swarm optimization

Parameters:
  • f_swarm (callable) – function taking in parameter a swarm (dim-dimensions array) and returning the cost for each particle (1-dimensionnal array)

  • kwargs (dict) – containing parameters to change in the class (:class:PSO_optimizer)

Returns:

results of the optimization

Return type:

optim_results