class_docstr: Test that support generation happens properly.
class_docstr_tok: ["Test","that","support","generation","happens","properly","."]
docstr: Tests that sampling supports for eval works properly.
docstr_tok: ["Tests","that","sampling","supports","for","eval","works","properly","."]
code: def test_evaluation_strategy(self):
      """Tests that sampling supports for eval works properly."""
      n_samples = 2000
      n_features = 3
      n_tasks = 5
      n_pos = 1
      n_neg = 5
      n_trials = 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.random.randint(2, size=(n_samples, n_tasks))
      dataset = dc.data.NumpyDataset(X, y, w, ids)
  
      support_generator = dc.data.SupportGenerator(
          dataset, n_pos, n_neg, n_trials
      )
  
      for ind, (task, support) in enumerate(support_generator):
          task_dataset = dc.data.get_task_dataset_minus_support(
              dataset, support, task
          )
  
          task_y = dataset.y[:, task]
          task_w = dataset.w[:, task]
          task_y = task_y[task_w != 0]
          assert len(task_y) == len(support) + len(task_dataset)
          logger.info(
              "Verifying that task_dataset doesn't overlap with support."
          )
          for task_id in task_dataset.ids:
              assert task_id not in set(support.ids)
  
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 13 for calling the TestSupports obj's underlying member method code with example usage: obj.test_evaluation_strategy() without return types