class_docstr: Split data in the fashion specified by user.
  
  For some applications, you will already know how you'd like to split the
  dataset. In this splitter, you simplify specify `valid_indices` and
  `test_indices` and the datapoints at those indices are pulled out of the
  dataset. Note that this is different from `IndexSplitter` which only splits
  based on the existing dataset ordering, while this `SpecifiedSplitter` can
  split on any specified ordering.
  
  Examples
  --------
  >>> import deepchem as dc
  >>> import numpy as np
  >>> n_samples = 10
  >>> n_features = 3
  >>> n_tasks = 1
  >>> X = np.random.rand(n_samples, n_features)
  >>> y = np.random.rand(n_samples, n_tasks)
  >>> splitter = dc.splits.SpecifiedSplitter(valid_indices=[1,3,5], test_indices=[0,2,7,9])
  >>> dataset = dc.data.NumpyDataset(X, y)
  >>> train_dataset, valid_dataset, test_dataset = splitter.train_valid_test_split(dataset)
  >>> print(train_dataset.ids)
  [4 6 8]
  >>> print(valid_dataset.ids)
  [1 3 5]
  >>> print(test_dataset.ids)
  [0 2 7 9]
class_docstr_tok: ["Split","data","in","the","fashion","specified","by","user",".","For","some","applications",",","you","will","already","know","how","you","'d","like","to","split","the","dataset",".","In","this","splitter",",","you","simplify","specify","`","valid_indices","`","and","`","test_indices","`","and","the","datapoints","at","those","indices","are","pulled","out","of","the","dataset",".","Note","that","this","is","different","from","`","IndexSplitter","`","which","only","splits","based","on","the","existing","dataset","ordering",",","while","this","`","SpecifiedSplitter","`","can","split","on","any","specified","ordering",".","Examples","--","--","--","--",">",">",">","import","deepchem","as","dc",">",">",">","import","numpy","as","np",">",">",">","n_samples","=","10",">",">",">","n_features","=","3",">",">",">","n_tasks","=","1",">",">",">","X","=","np.random.rand","(","n_samples",",","n_features",")",">",">",">","y","=","np.random.rand","(","n_samples",",","n_tasks",")",">",">",">","splitter","=","dc.splits.SpecifiedSplitter","(","valid_indices=","[","1,3,5","]",",","test_indices=","[","0,2,7,9","]",")",">",">",">","dataset","=","dc.data.NumpyDataset","(","X",",","y",")",">",">",">","train_dataset",",","valid_dataset",",","test_dataset","=","splitter.train_valid_test_split","(","dataset",")",">",">",">","print","(","train_dataset.ids",")","[","4","6","8","]",">",">",">","print","(","valid_dataset.ids",")","[","1","3","5","]",">",">",">","print","(","test_dataset.ids",")","[","0","2","7","9","]"]
docstr: Parameters
  -----------
  valid_indices: List[int]
      List of indices of samples in the valid set
  test_indices: List[int]
      List of indices of samples in the test set
docstr_tok: ["Parameters","--","--","--","--","--","-","valid_indices",":","List","[","int","]","List","of","indices","of","samples","in","the","valid","set","test_indices",":","List","[","int","]","List","of","indices","of","samples","in","the","test","set"]
code: def __init__(
      self,
      valid_indices: Optional[List[int]] = None,
      test_indices: Optional[List[int]] = None,
  ):
      """
      Parameters
      -----------
      valid_indices: List[int]
          List of indices of samples in the valid set
      test_indices: List[int]
          List of indices of samples in the test set
      """
      self.valid_indices = valid_indices
      self.test_indices = test_indices
  
imports: import inspect
  import itertools
  import logging
  import os
  import random
  import tempfile
  from typing import Any, Dict, Iterator, List, Optional, Sequence, Tuple, Union
  import deepchem
  import numpy
  import pandas
  from deepchem.data import Dataset, DiskDataset
  from deepchem.utils import get_print_threshold
label_desc: Use image node_id 1 to create a new SpecifiedSplitter object from inherited base classes: Splitter with example: obj = SpecifiedSplitter(valid_indices, test_indices)