class_docstr: Test some basic splitters.
docstr: Test TaskSplitter K-fold split on multitask dataset.
docstr_tok: ["Test","TaskSplitter","K-fold","split","on","multitask","dataset","."]
code: def test_multitask_K_fold_split(self):
      """Test TaskSplitter K-fold split on multitask dataset."""
      n_samples = 100
      n_features = 10
      n_tasks = 10
      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)
      K = 5
  
      task_splitter = dc.splits.TaskSplitter()
      fold_datasets = task_splitter.k_fold_split(dataset, K)
  
      for fold_dataset in fold_datasets:
          assert len(fold_dataset.get_task_names()) == 2
  
file_path: deepchem/deepchem/splits/tests/test_task_splitter.py
imports: import unittest
  import numpy
  import deepchem
label_desc: Use image node_id 2 for calling the TestTaskSplitters obj's underlying member method code with example usage: obj.test_multitask_K_fold_split() without return types