class_docstr: Test some basic splitters.
docstr: Test train/valid/test split works when proportions don't divide n_tasks.
docstr_tok: ["Test","train\/valid\/test","split","works","when","proportions","do","n't","divide","n_tasks","."]
code: def test_uneven_train_valid_test_split(self):
      """Test train/valid/test split works when proportions don't divide n_tasks."""
      n_samples = 100
      n_features = 10
      n_tasks = 11
      X = np.random.rand(n_samples, n_features)
      p = 0.05  # proportion actives
      y = np.random.binomial(1, p, size=(n_samples, n_tasks))
      dataset = dc.data.NumpyDataset(X, y)
  
      task_splitter = dc.splits.TaskSplitter()
      train, valid, test = task_splitter.train_valid_test_split(
          dataset, frac_train=0.4, frac_valid=0.3, frac_test=0.3
      )
  
      assert len(train.get_task_names()) == 4
      assert len(valid.get_task_names()) == 3
      # Note that the extra task goes to test
      assert len(test.get_task_names()) == 4
  
file_path: deepchem/deepchem/splits/tests/test_task_splitter.py
imports: import unittest
  import numpy
  import deepchem
label_desc: Use image node_id 4 for calling the TestTaskSplitters obj's underlying member method code with example usage: obj.test_uneven_train_valid_test_split() without return types