class_docstr: Test some basic splitters.
docstr: Test RandomStratifiedSplitter's split method on simple singletas.
code: def test_singletask_stratified_column_indices(self):
      """
      Test RandomStratifiedSplitter's split method on simple singletas.
      """
      # Test singletask case.
      n_samples = 100
      n_positives = 20
      n_tasks = 1
  
      X = np.ones(n_samples)
      y = np.zeros((n_samples, n_tasks))
      y[:n_positives] = 1
      w = np.ones((n_samples, n_tasks))
      dataset = dc.data.NumpyDataset(X, y, w)
      stratified_splitter = dc.splits.RandomStratifiedSplitter()
      train, valid, test = stratified_splitter.split(
          dataset, 0.5, 0, 0.5
      )
  
      # The split index should partition dataset in half.
      assert len(train) == 50
      assert len(valid) == 0
      assert len(test) == 50
      assert np.count_nonzero(y[train]) == 10
      assert np.count_nonzero(y[test]) == 10
  
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 13 for calling the TestSplitter obj's underlying member method code with example usage: obj.test_singletask_stratified_column_indices() without return types