class_docstr: Test that support generation happens properly.
class_docstr_tok: ["Test","that","support","generation","happens","properly","."]
docstr: Tests that samples from support generator have desired shape.
docstr_tok: ["Tests","that","samples","from","support","generator","have","desired","shape","."]
code: def test_support_generator_correct_samples(self):
      """Tests that samples from support generator have desired shape."""
      n_samples = 20
      n_features = 3
      n_tasks = 1
      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.ones((n_samples, n_tasks))
      dataset = dc.data.NumpyDataset(X, y, w, ids)
  
      # Create support generator
      supp_gen = dc.data.SupportGenerator(
          dataset, n_pos, n_neg, n_trials
      )
      num_supports = 0
  
      for task, support in supp_gen:
          assert support.X.shape == (n_pos + n_neg, n_features)
          num_supports += 1
          assert task == 0  # Only one task in this example
          n_supp_pos = np.count_nonzero(support.y)
          assert n_supp_pos == n_pos
      assert num_supports == n_trials
  
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 12 for calling the TestSupports obj's underlying member method code with example usage: obj.test_support_generator_correct_samples() without return types