class_docstr: generates splits of indices for a given length of a dataset to perform n-fold cross-validation.
  splits each fold into 3 subsets for training, validation and testing.
  This form of cross validation uses an inner loop test set, which is useful if test scores shall be reported on a
  statistically reliable amount of patients, despite limited size of a dataset.
  If hold out test set is provided and hence no inner loop test set needed, just add test_idxs to the training data in the dataloader.
  This creates straight-forward train-val splits.
  :returns names list: list of len n_splits. each element is a list of len 3 for train_ix, val_ix, test_ix.
class_docstr_tok: ["generates","splits","of","indices","for","a","given","length","of","a","dataset","to","perform","n-fold","cross-validation",".","splits","each","fold","into","3","subsets","for","training",",","validation","and","testing",".","This","form","of","cross","validation","uses","an","inner","loop","test","set",",","which","is","useful","if","test","scores","shall","be","reported","on","a","statistically","reliable","amount","of","patients",",","despite","limited","size","of","a","dataset",".","If","hold","out","test","set","is","provided","and","hence","no","inner","loop","test","set","needed",",","just","add","test_idxs","to","the","training","data","in","the","dataloader",".","This","creates","straight-forward","train-val","splits",".",":","returns","names","list",":","list","of","len","n_splits",".","each","element","is","a","list","of","len","3","for","train_ix",",","val_ix",",","test_ix","."]
docstr: :param seed: Random seed for splits.
  :param n_splits: number of splits, e.g. 5 splits for 5-fold cross-validation
  :param len_data: number of elements in the dataset.
docstr_tok: [":","param","seed",":","Random","seed","for","splits",".",":","param","n_splits",":","number","of","splits",",","e.g",".","5","splits","for","5-fold","cross-validation",":","param","len_data",":","number","of","elements","in","the","dataset","."]
code: def __init__(self, seed, n_splits, len_data):
      """
      :param seed: Random seed for splits.
      :param n_splits: number of splits, e.g. 5 splits for 5-fold cross-validation
      :param len_data: number of elements in the dataset.
      """
      self.tr_ix = []
      self.val_ix = []
      self.te_ix = []
      self.slicer = None
      self.missing = 0
      self.fold = 0
      self.len_data = len_data
      self.n_splits = n_splits
      self.myseed = seed
      self.boost_val = 0
  
file_path: medicaldetectiontoolkit/utils/dataloader_utils.py
imports: import numpy
  import os
  from multiprocessing import Pool
label_desc: Use image node_id 1 to create a new fold_generator object  with example: obj = fold_generator(seed, n_splits, len_data)