original_docstring: 
          Get the proportion of training data in each class
          
docstring: Get the proportion of training data in each class
docstring_tokens: Get the proportion of training data in each class
code: def class_priors(self):
          """
          Get the proportion of training data in each class
          """
          if self._class_priors == []:
              class_probs = np.zeros(len(self.classes))
              for class_index, class_name in enumerate(self.classes):
                  # Tally up how many filenames are in this class
                  # Set to zero if this class is not a field
                  class_probs[class_index] = len(self.image_fnames['train'].get(class_name, 0))
              # Normalise the classes
              class_probs /= sum(class_probs)
              self._class_priors = class_probs
  
          return self._class_priors
code_tokens: def class_priors ( self ) : if self . _class_priors == [ ] : class_probs = np . zeros ( len ( self . classes ) ) for class_index , class_name in enumerate ( self . classes ) : class_probs [ class_index ] = len ( self . image_fnames [ 'train' ] . get ( class_name , 0 ) ) class_probs /= sum ( class_probs ) self . _class_priors = class_probs return self . _class_priors
short_docstring: Get the proportion of training data in each class
short_docstring_tokens: Get the proportion of training data in each class
comment: """
          Get the proportion of training data in each class
          """$SEP$# Tally up how many filenames are in this class$SEP$# Set to zero if this class is not a field$SEP$# Normalise the classes