class_docstr: Generate support sets from a dataset.
  
  Iterates over tasks and trials. For each trial, picks one support from
  each task, and returns in a randomized order
class_docstr_tok: ["Generate","support","sets","from","a","dataset",".","Iterates","over","tasks","and","trials",".","For","each","trial",",","picks","one","support","from","each","task",",","and","returns","in","a","randomized","order"]
docstr: Parameters
  ----------
  dataset: dc.data.Dataset
      Holds dataset from which support sets will be sampled.
  n_pos: int
      Number of positive samples
  n_neg: int
      Number of negative samples.
  n_trials: int
      Number of passes over dataset to make. In total, n_tasks*n_trials
      support sets will be sampled by algorithm.
docstr_tok: ["Parameters","--","--","--","--","--","dataset",":","dc.data.Dataset","Holds","dataset","from","which","support","sets","will","be","sampled",".","n_pos",":","int","Number","of","positive","samples","n_neg",":","int","Number","of","negative","samples",".","n_trials",":","int","Number","of","passes","over","dataset","to","make",".","In","total",",","n_tasks","*","n_trials","support","sets","will","be","sampled","by","algorithm","."]
code: def __init__(self, dataset, n_pos, n_neg, n_trials):
      """
      Parameters
      ----------
      dataset: dc.data.Dataset
          Holds dataset from which support sets will be sampled.
      n_pos: int
          Number of positive samples
      n_neg: int
          Number of negative samples.
      n_trials: int
          Number of passes over dataset to make. In total, n_tasks*n_trials
          support sets will be sampled by algorithm.
      """
  
      self.tasks = range(len(dataset.get_task_names()))
      self.n_tasks = len(self.tasks)
      self.n_trials = n_trials
      self.dataset = dataset
      self.n_pos = n_pos
      self.n_neg = n_neg
  
      # Init the iterator
      self.perm_tasks = np.random.permutation(self.tasks)
      # Set initial iterator state
      self.task_num = 0
      self.trial_num = 0
  
imports: import logging
  import time
  import numpy
  from deepchem.data import NumpyDataset
label_desc: Use image node_id 1 to create a new SupportGenerator object from inherited base classes: object with example: obj = SupportGenerator(dataset, n_pos, n_neg, n_trials)