class_docstr: Test that support generation happens properly.
class_docstr_tok: ["Test","that","support","generation","happens","properly","."]
docstr: Conducts simple test that episode generator runs.
docstr_tok: ["Conducts","simple","test","that","episode","generator","runs","."]
code: def test_simple_episode_generator(self):
      """Conducts simple test that episode generator runs."""
      n_samples = 20
      n_features = 3
      n_tasks = 1
      n_pos = 1
      n_neg = 5
      n_test = 10
      n_episodes = 10
  
      # Generate dummy dataset
      np.random.seed(123)
      ids = np.arange(n_samples)
      X = np.random.rand(n_samples, n_features)
      y = np.random.randint(2, size=(n_samples, n_tasks))
      w = np.ones((n_samples, n_tasks))
      dataset = dc.data.NumpyDataset(X, y, w, ids)
  
      # Create support generator
      episode_gen = dc.data.EpisodeGenerator(
          dataset, n_pos, n_neg, n_test, n_episodes
      )
  
      n_episodes_found = 0
      for task, support, test in episode_gen:
          assert task >= 0
          assert task < n_tasks
          assert len(support) == n_pos + n_neg
          assert np.count_nonzero(support.y) == n_pos
          assert len(test) == n_test
          n_episodes_found += 1
      assert n_episodes_found == n_episodes
  
file_path: deepchem/deepchem/data/tests/test_support_generator.py
imports: import logging
  import numpy
  import unittest
  import deepchem
label_desc: Use image node_id 6 for calling the TestSupports obj's underlying member method code with example usage: obj.test_simple_episode_generator() without return types