class_docstr: Test some basic splitters.
docstr: Test RandomStratifiedSplitter's split method on dataset with mask.
code: def test_singletask_stratified_column_indices_mask(self):
      """
      Test RandomStratifiedSplitter's split method on dataset with mask.
      """
      # Test singletask case.
      n_samples = 100
      n_positives = 20
      n_tasks = 1
  
      # Test case where some weights are zero (i.e. masked)
      X = np.ones(n_samples)
      y = np.zeros((n_samples, n_tasks))
      y[:n_positives] = 1
      w = np.ones((n_samples, n_tasks))
      # Set half the positives to have zero weight
      w[: n_positives // 2] = 0
      dataset = dc.data.NumpyDataset(X, y, w)
  
      stratified_splitter = dc.splits.RandomStratifiedSplitter()
      train, valid, test = stratified_splitter.split(
          dataset, 0.5, 0, 0.5
      )
  
      # There are 10 nonzero actives.
      # The split index should partition this into half, so expect 5
      w_present = w != 0
      y_present = y * w_present
      assert np.count_nonzero(y_present[train]) == 5
  
imports: import os
  import unittest
  import numpy
  import deepchem
  from deepchem.data import NumpyDataset
  from deepchem.splits import IndexSplitter
label_desc: Use image node_id 14 for calling the TestSplitter obj's underlying member method code with example usage: obj.test_singletask_stratified_column_indices_mask() without return types