class_docstr: Test that support generation happens properly.
class_docstr_tok: ["Test","that","support","generation","happens","properly","."]
docstr: Test that support can be removed from dataset with missing data
docstr_tok: ["Test","that","support","can","be","removed","from","dataset","with","missing","data"]
code: def test_get_task_minus_support_missing(self):
      """Test that support can be removed from dataset with missing data"""
      n_samples = 20
      n_support = 4
      n_features = 3
      n_tasks = 1
  
      # 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))
      # Set last n_samples/2 weights to 0
      w[n_samples // 2 :] = 0
      dataset = dc.data.NumpyDataset(X, y, w, ids)
  
      # Sample from first n_samples/2 elements for support
      support_inds = sorted(
          np.random.choice(
              np.arange(n_samples // 2), (n_support,), replace=False
          )
      )
      support_dataset = dc.data.NumpyDataset(
          X[support_inds],
          y[support_inds],
          w[support_inds],
          ids[support_inds],
      )
  
      task_dataset = dc.data.get_task_dataset_minus_support(
          dataset, support_dataset, task=0
      )
  
      # Should lie within first n_samples/2 samples only
      assert len(task_dataset) == n_samples / 2 - n_support
      for identifier in task_dataset.ids:
          assert identifier < n_samples / 2
  
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 11 for calling the TestSupports obj's underlying member method code with example usage: obj.test_get_task_minus_support_missing() without return types