(pop)
Boltzmann scaling scheme. You can specify the **boltz_temperature** to the
   population parameters, this parameter will set the start temperature. You
   can specify the **boltz_factor** and the **boltz_min** parameters, the **boltz_factor**
   is the value that the temperature will be subtracted and the **boltz_min** is the
   mininum temperature of the scaling scheme.

   .. versionadded: 0.6
      The `BoltzmannScaling` function.
Boltzmann scaling scheme. You can specify the **boltz_temperature** to the
   population parameters, this parameter will set the start temperature. You
   can specify the **boltz_factor** and the **boltz_min** parameters, the **boltz_factor**
   is the value that the temperature will be subtracted and the **boltz_min** is the
   mininum temperature of the scaling scheme.
Boltzmann scaling scheme . You can specify the ** boltz_temperature ** to the population parameters this parameter will set the start temperature . You can specify the ** boltz_factor ** and the ** boltz_min ** parameters the ** boltz_factor ** is the value that the temperature will be subtracted and the ** boltz_min ** is the mininum temperature of the scaling scheme .
def BoltzmannScaling(pop):
   """ Boltzmann scaling scheme. You can specify the **boltz_temperature** to the
   population parameters, this parameter will set the start temperature. You
   can specify the **boltz_factor** and the **boltz_min** parameters, the **boltz_factor**
   is the value that the temperature will be subtracted and the **boltz_min** is the
   mininum temperature of the scaling scheme.

   .. versionadded: 0.6
      The `BoltzmannScaling` function.

   """
   boltz_temperature = pop.getParam("boltz_temperature", Consts.CDefScaleBoltzStart)
   boltz_factor = pop.getParam("boltz_factor", Consts.CDefScaleBoltzFactor)
   boltz_min = pop.getParam("boltz_min", Consts.CDefScaleBoltzMinTemp)

   boltz_temperature -= boltz_factor
   boltz_temperature = max(boltz_temperature, boltz_min)
   pop.setParams(boltzTemperature=boltz_temperature)

   boltz_e = []
   avg = 0.0

   for i in xrange(len(pop)):
      val = math.exp(pop[i].score / boltz_temperature)
      boltz_e.append(val)
      avg += val

   avg /= len(pop)

   for i in xrange(len(pop)):
      pop[i].fitness = boltz_e[i] / avg
def BoltzmannScaling ( pop ) : boltz_temperature = pop . getParam ( "boltz_temperature" , Consts . CDefScaleBoltzStart ) boltz_factor = pop . getParam ( "boltz_factor" , Consts . CDefScaleBoltzFactor ) boltz_min = pop . getParam ( "boltz_min" , Consts . CDefScaleBoltzMinTemp ) boltz_temperature -= boltz_factor boltz_temperature = max ( boltz_temperature , boltz_min ) pop . setParams ( boltzTemperature = boltz_temperature ) boltz_e = [ ] avg = 0.0 for i in xrange ( len ( pop ) ) : val = math . exp ( pop [ i ] . score / boltz_temperature ) boltz_e . append ( val ) avg += val avg /= len ( pop ) for i in xrange ( len ( pop ) ) : pop [ i ] . fitness = boltz_e [ i ] / avg