docstr: Reset the attributes of the optimizer
  
  All variables/atributes that will be re-initialized when this
  method is defined here. Note that this method
  can be called twice: (1) during initialization, and (2) when
  this is called from an instance.
  
  It is good practice to keep the number of resettable
  attributes at a minimum. This is to prevent spamming the same
  object instance with various swarm definitions.
  
  Normally, swarm definitions are as atomic as possible, where
  each type of swarm is contained in its own instance. Thus, the
  following attributes are the only ones recommended to be
  resettable:
  
  * Swarm position matrix (self.pos)
  * Velocity matrix (self.pos)
  * Best scores and positions (gbest_cost, gbest_pos, etc.)
  
  Otherwise, consider using positional arguments.
code: def reset(self):
      """Reset the attributes of the optimizer
  
      All variables/atributes that will be re-initialized when this
      method is defined here. Note that this method
      can be called twice: (1) during initialization, and (2) when
      this is called from an instance.
  
      It is good practice to keep the number of resettable
      attributes at a minimum. This is to prevent spamming the same
      object instance with various swarm definitions.
  
      Normally, swarm definitions are as atomic as possible, where
      each type of swarm is contained in its own instance. Thus, the
      following attributes are the only ones recommended to be
      resettable:
  
      * Swarm position matrix (self.pos)
      * Velocity matrix (self.pos)
      * Best scores and positions (gbest_cost, gbest_pos, etc.)
  
      Otherwise, consider using positional arguments.
      """
      # Initialize history lists
      self.cost_history = []
      self.mean_pbest_history = []
      self.mean_neighbor_history = []
      self.pos_history = []
      self.velocity_history = []
  
      # Initialize the swarm
      self.swarm = create_swarm(
          n_particles=self.n_particles,
          dimensions=self.dimensions,
          bounds=self.bounds,
          center=self.center,
          init_pos=self.init_pos,
          clamp=self.velocity_clamp,
          options=self.options,
      )
  
file_path: pyswarms/pyswarms/base/base_single.py
imports: import abc
  from collections import namedtuple
  import numpy
  from ..backend import create_swarm
label_desc: Use image node_id 4 for calling the SwarmOptimizer obj's underlying member method code with example usage: obj.reset() without return types