class_docstr: Train/Validation set splitter for sklearn's GridSearchCV etc.
  
  Provides train/validation set indices to split a dataset
  into train/validation sets using random indices.
  
  Parameters
  ----------
  valid_size : float (default: 0.5)
      Proportion of examples that being assigned as
      validation examples. 1-`valid_size` will then automatically
      be assigned as training set examples.
  random_seed : int (default: None)
      The random seed for splitting the data
      into training and validation set partitions.
  stratify : bool (default: False)
      True or False, whether to perform a stratified
      split or not
  
  Examples
  -----------
  For usage examples, please see
  https://rasbt.github.io/mlxtend/user_guide/evaluate/RandomHoldoutSplit/
class_docstr_tok: ["Train\/Validation","set","splitter","for","sklearn","'s","GridSearchCV","etc",".","Provides","train\/validation","set","indices","to","split","a","dataset","into","train\/validation","sets","using","random","indices",".","Parameters","--","--","--","--","--","valid_size",":","float","(","default",":","0.5",")","Proportion","of","examples","that","being","assigned","as","validation","examples",".","1-","`","valid_size","`","will","then","automatically","be","assigned","as","training","set","examples",".","random_seed",":","int","(","default",":","None",")","The","random","seed","for","splitting","the","data","into","training","and","validation","set","partitions",".","stratify",":","bool","(","default",":","False",")","True","or","False",",","whether","to","perform","a","stratified","split","or","not","Examples","--","--","--","--","--","-","For","usage","examples",",","please","see","https",":","\/\/rasbt.github.io\/mlxtend\/user_guide\/evaluate\/RandomHoldoutSplit\/"]
docstr: Generate indices to split data into training and test set.
  
  Parameters
  ----------
  X : array-like, shape (num_examples, num_features)
      Training data, where num_examples is the number of
      training examples and num_features is the number of features.
  
  y : array-like, shape (num_examples,)
      The target variable for supervised learning problems.
      Stratification is done based on the y labels.
  
  groups : object
      Always ignored, exists for compatibility.
  
  Yields
  ------
  train_index : ndarray
      The training set indices for that split.
  
  valid_index : ndarray
      The validation set indices for that split.
docstr_tok: ["Generate","indices","to","split","data","into","training","and","test","set",".","Parameters","--","--","--","--","--","X",":","array-like",",","shape","(","num_examples",",","num_features",")","Training","data",",","where","num_examples","is","the","number","of","training","examples","and","num_features","is","the","number","of","features",".","y",":","array-like",",","shape","(","num_examples",",",")","The","target","variable","for","supervised","learning","problems",".","Stratification","is","done","based","on","the","y","labels",".","groups",":","object","Always","ignored",",","exists","for","compatibility",".","Yields","--","--","--","train_index",":","ndarray","The","training","set","indices","for","that","split",".","valid_index",":","ndarray","The","validation","set","indices","for","that","split","."]
code: def split(self, X, y, groups=None):
      """Generate indices to split data into training and test set.
  
      Parameters
      ----------
      X : array-like, shape (num_examples, num_features)
          Training data, where num_examples is the number of
          training examples and num_features is the number of features.
  
      y : array-like, shape (num_examples,)
          The target variable for supervised learning problems.
          Stratification is done based on the y labels.
  
      groups : object
          Always ignored, exists for compatibility.
  
      Yields
      ------
      train_index : ndarray
          The training set indices for that split.
  
      valid_index : ndarray
          The validation set indices for that split.
      """
      ind = np.arange(X.shape[0])
      if self.stratify:
          train_index, valid_index, _, _ = train_test_split(
              ind,
              y,
              test_size=self.valid_size,
              shuffle=True,
              stratify=y,
              random_state=self.random_seed,
          )
  
      else:
          train_index, valid_index, _, _ = train_test_split(
              ind,
              y,
              test_size=self.valid_size,
              shuffle=True,
              stratify=y,
              random_state=self.random_seed,
          )
  
      for i in range(1):
          yield train_index, valid_index
  
file_path: mlxtend/mlxtend/evaluate/holdout.py
imports: import numpy
  from sklearn.model_selection import train_test_split
label_desc: Use image node_id 2 for calling the RandomHoldoutSplit obj's underlying member method code with example usage: obj.split(X, y, groups) without return types