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: Splits internal compounds into train/validation/test in designated order.
  
  Parameters
  ----------
  dataset: Dataset
      Dataset to be split.
  frac_train: float, optional (default 0.8)
      Fraction of dataset put into training data.
  frac_valid: float, optional (default 0.1)
      Fraction of dataset put into validation data.
  frac_test: float, optional (default 0.1)
      Fraction of dataset put into test data.
  seed: int, optional (default None)
      Random seed to use.
  log_every_n: int, optional (default None)
      Log every n examples (not currently used).
  
  Returns
  -------
  Tuple[np.ndarray, np.ndarray, np.ndarray]
      A tuple of train indices, valid indices, and test indices.
      Each indices is a numpy array.
docstr_tok: ["Splits","internal","compounds","into","train\/validation\/test","in","designated","order",".","Parameters","--","--","--","--","--","dataset",":","Dataset","Dataset","to","be","split",".","frac_train",":","float",",","optional","(","default","0.8",")","Fraction","of","dataset","put","into","training","data",".","frac_valid",":","float",",","optional","(","default","0.1",")","Fraction","of","dataset","put","into","validation","data",".","frac_test",":","float",",","optional","(","default","0.1",")","Fraction","of","dataset","put","into","test","data",".","seed",":","int",",","optional","(","default","None",")","Random","seed","to","use",".","log_every_n",":","int",",","optional","(","default","None",")","Log","every","n","examples","(","not","currently","used",")",".","Returns","--","--","--","-","Tuple","[","np.ndarray",",","np.ndarray",",","np.ndarray","]","A","tuple","of","train","indices",",","valid","indices",",","and","test","indices",".","Each","indices","is","a","numpy","array","."]
code: def split(
      self,
      dataset: Dataset,
      frac_train: float = 0.8,
      frac_valid: float = 0.1,
      frac_test: float = 0.1,
      seed: Optional[int] = None,
      log_every_n: Optional[int] = None,
  ) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:
      """
      Splits internal compounds into train/validation/test in designated order.
  
      Parameters
      ----------
      dataset: Dataset
          Dataset to be split.
      frac_train: float, optional (default 0.8)
          Fraction of dataset put into training data.
      frac_valid: float, optional (default 0.1)
          Fraction of dataset put into validation data.
      frac_test: float, optional (default 0.1)
          Fraction of dataset put into test data.
      seed: int, optional (default None)
          Random seed to use.
      log_every_n: int, optional (default None)
          Log every n examples (not currently used).
  
      Returns
      -------
      Tuple[np.ndarray, np.ndarray, np.ndarray]
          A tuple of train indices, valid indices, and test indices.
          Each indices is a numpy array.
      """
      num_datapoints = len(dataset)
      indices = np.arange(num_datapoints).tolist()
      train_indices = []
      if self.valid_indices is None:
          self.valid_indices = []
      if self.test_indices is None:
          self.test_indices = []
      valid_test = list(self.valid_indices)
      valid_test.extend(self.test_indices)
      for indice in indices:
          if indice not in valid_test:
              train_indices.append(indice)
  
      return (
          np.array(train_indices),
          np.array(self.valid_indices),
          np.array(self.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 2 for calling the SpecifiedSplitter obj's underlying member method code with example usage: obj.split(dataset, frac_train, frac_valid, frac_test, seed, log_every_n) and returns: np,  np,  np