class_docstr: Activation generator for the KDD99 dataset.
  
  This uses the KDD99 dataset from sklearn. It is automatically loaded when we
  try to train models, so no data downloading is required.
  
  You can read more about it here:
  https://scikit-learn.org/stable/modules/generated/sklearn.datasets.fetch_kddcup99.html
  
  To see it in action, please check kdd99_discrete_example.ipynb
class_docstr_tok: ["Activation","generator","for","the","KDD99","dataset",".","This","uses","the","KDD99","dataset","from","sklearn",".","It","is","automatically","loaded","when","we","try","to","train","models",",","so","no","data","downloading","is","required",".","You","can","read","more","about","it","here",":","https",":","\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.datasets.fetch_kddcup99.html","To","see","it","in","action",",","please","check","kdd99_discrete_example.ipynb"]
docstr: Reads csv files into a numpy.ndarray containing income data
  
  For this case, we create directories follow the following structure
  source_dir >>
                concept >>
                          >> concept.csv
  
  The concepts will then be extracted into a numpy ndarray.
  
  Args:
    concept: string, This method takes names of a concept folder is an input.
      They should be located in source_dir
  
  Returns:
    texts: A numpy array, where each subarray contains one row of the dataset
docstr_tok: ["Reads","csv","files","into","a","numpy.ndarray","containing","income","data","For","this","case",",","we","create","directories","follow","the","following","structure","source_dir",">",">","concept",">",">",">",">","concept.csv","The","concepts","will","then","be","extracted","into","a","numpy","ndarray",".","Args",":","concept",":","string",",","This","method","takes","names","of","a","concept","folder","is","an","input",".","They","should","be","located","in","source_dir","Returns",":","texts",":","A","numpy","array",",","where","each","subarray","contains","one","row","of","the","dataset"]
code: def load_data(self, concept):
      """Reads csv files into a numpy.ndarray containing income data
  
      For this case, we create directories follow the following structure
      source_dir >>
                    concept >>
                              >> concept.csv
  
      The concepts will then be extracted into a numpy ndarray.
  
      Args:
        concept: string, This method takes names of a concept folder is an input.
          They should be located in source_dir
  
      Returns:
        texts: A numpy array, where each subarray contains one row of the dataset
  
      """
      concept_folder = os.path.join(self.source_dir, concept)
      concept_file = os.path.join(concept_folder, concept + ".csv")
      with tf.io.gfile.GFile(concept_file, "r") as f:
          texts = [
              l.strip().split(",")
              for l in f.readlines()[: self.max_examples + 1]
          ]
      texts = np.array(texts, dtype="O")
      texts = texts[1:]  # remove headers
      texts = texts[:, :-1]  # remove labels
      texts = self._convert_types(texts)  # Assign proper data types
      return texts
  
file_path: tcav/tcav/tcav_examples/discrete/kdd99_activation_generator.py
imports: import os
  from tcav.activation_generator import DiscreteActivationGeneratorBase
  from tcav.tcav_examples.discrete.kdd99_model import encode_variables, kBytesIndices, kFloatIndices, kIntIndices
  import numpy
  import tensorflow
label_desc: Use image node_id 2 for calling the KDD99DiscreteActivationGenerator obj's underlying member method code with example usage: obj.load_data(concept) and returns: texts