class_docstr: An implementation of a Genetic Algorithm which will try to produce the user
  specified target string.
  
  Parameters:
  -----------
  target_string: string
      The string which the GA should try to produce.
  population_size: int
      The number of individuals (possible solutions) in the population.
  mutation_rate: float
      The rate (or probability) of which the alleles (chars in this case) should be
      randomly changed.
docstr: Calculates the fitness of each individual in the population 
code: def _calculate_fitness(self):
      """Calculates the fitness of each individual in the population"""
      population_fitness = []
      for individual in self.population:
          # Calculate loss as the alphabetical distance between
          # the characters in the individual and the target string
          loss = 0
          for i in range(len(individual)):
              letter_i1 = self.letters.index(individual[i])
              letter_i2 = self.letters.index(self.target[i])
              loss += abs(letter_i1 - letter_i2)
          fitness = 1 / (loss + 1e-6)
          population_fitness.append(fitness)
      return population_fitness
  
file_path: ML-From-Scratch/mlfromscratch/unsupervised_learning/genetic_algorithm.py
imports: from __future__ import print_function, division
  import string
  import numpy
label_desc: Use image node_id 3 for calling the GeneticAlgorithm obj's underlying member method code with example usage: obj._calculate_fitness() and returns: population_fitness