class_docstr: Class for simple order based splits.
  
  Use this class when the `Dataset` you have is already ordered sa you would
  like it to be processed. Then the first `frac_train` proportion is used for
  training, the next `frac_valid` for validation, and the final `frac_test` for
  testing. This class may make sense to use your `Dataset` is already time
  ordered (for example).
  
  Examples
  --------
  >>> import deepchem as dc
  >>> import numpy as np
  >>> n_samples = 5
  >>> n_features = 2
  >>> X = np.random.rand(n_samples, n_features)
  >>> y = np.random.rand(n_samples)
  >>> indexsplitter = dc.splits.IndexSplitter()
  >>> dataset = dc.data.NumpyDataset(X, y)
  >>> train_dataset, test_dataset = indexsplitter.train_test_split(dataset)
  >>> print(train_dataset.ids)
  [0 1 2 3]
  >>> print (test_dataset.ids)
  [4]
class_docstr_tok: ["Class","for","simple","order","based","splits",".","Use","this","class","when","the","`","Dataset","`","you","have","is","already","ordered","sa","you","would","like","it","to","be","processed",".","Then","the","first","`","frac_train","`","proportion","is","used","for","training",",","the","next","`","frac_valid","`","for","validation",",","and","the","final","`","frac_test","`","for","testing",".","This","class","may","make","sense","to","use","your","`","Dataset","`","is","already","time","ordered","(","for","example",")",".","Examples","--","--","--","--",">",">",">","import","deepchem","as","dc",">",">",">","import","numpy","as","np",">",">",">","n_samples","=","5",">",">",">","n_features","=","2",">",">",">","X","=","np.random.rand","(","n_samples",",","n_features",")",">",">",">","y","=","np.random.rand","(","n_samples",")",">",">",">","indexsplitter","=","dc.splits.IndexSplitter","(",")",">",">",">","dataset","=","dc.data.NumpyDataset","(","X",",","y",")",">",">",">","train_dataset",",","test_dataset","=","indexsplitter.train_test_split","(","dataset",")",">",">",">","print","(","train_dataset.ids",")","[","0","1","2","3","]",">",">",">","print","(","test_dataset.ids",")","[","4","]"]
docstr: Splits internal compounds into train/validation/test in provided order.
  
  Parameters
  ----------
  dataset: Dataset
      Dataset to be split.
  frac_train: float, optional (default 0.8)
      The fraction of data to be used for the training split.
  frac_valid: float, optional (default 0.1)
      The fraction of data to be used for the validation split.
  frac_test: float, optional (default 0.1)
      The fraction of data to be used for the test split.
  seed: int, optional (default None)
      Random seed to use.
  log_every_n: int, optional
      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","provided","order",".","Parameters","--","--","--","--","--","dataset",":","Dataset","Dataset","to","be","split",".","frac_train",":","float",",","optional","(","default","0.8",")","The","fraction","of","data","to","be","used","for","the","training","split",".","frac_valid",":","float",",","optional","(","default","0.1",")","The","fraction","of","data","to","be","used","for","the","validation","split",".","frac_test",":","float",",","optional","(","default","0.1",")","The","fraction","of","data","to","be","used","for","the","test","split",".","seed",":","int",",","optional","(","default","None",")","Random","seed","to","use",".","log_every_n",":","int",",","optional","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 provided order.
  
      Parameters
      ----------
      dataset: Dataset
          Dataset to be split.
      frac_train: float, optional (default 0.8)
          The fraction of data to be used for the training split.
      frac_valid: float, optional (default 0.1)
          The fraction of data to be used for the validation split.
      frac_test: float, optional (default 0.1)
          The fraction of data to be used for the test split.
      seed: int, optional (default None)
          Random seed to use.
      log_every_n: int, optional
          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.
      """
      np.testing.assert_almost_equal(
          frac_train + frac_valid + frac_test, 1.0
      )
      num_datapoints = len(dataset)
      train_cutoff = int(frac_train * num_datapoints)
      valid_cutoff = int((frac_train + frac_valid) * num_datapoints)
      indices = np.arange(num_datapoints)
      return (
          indices[:train_cutoff],
          indices[train_cutoff:valid_cutoff],
          indices[valid_cutoff:],
      )
  
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 for calling the IndexSplitter obj's underlying member method code with example usage: obj.split(dataset, frac_train, frac_valid, frac_test, seed, log_every_n) and returns: indices,  indices,  indices