class_docstr: Train/Validation set splitter for sklearn's GridSearchCV etc.
  
  Uses user-specified train/validation set indices to split a dataset
  into train/validation sets using user-defined or random
  indices.
  
  Parameters
  ----------
  valid_indices : array-like, shape (num_examples,)
      Indices of the training examples in the training set
      to be used for validation. All other indices in the
      training set are used to for a training subset
      for model fitting.
  
  Examples
  -----------
  For usage examples, please see
  https://rasbt.github.io/mlxtend/user_guide/evaluate/PredefinedHoldoutSplit/
class_docstr_tok: ["Train\/Validation","set","splitter","for","sklearn","'s","GridSearchCV","etc",".","Uses","user-specified","train\/validation","set","indices","to","split","a","dataset","into","train\/validation","sets","using","user-defined","or","random","indices",".","Parameters","--","--","--","--","--","valid_indices",":","array-like",",","shape","(","num_examples",",",")","Indices","of","the","training","examples","in","the","training","set","to","be","used","for","validation",".","All","other","indices","in","the","training","set","are","used","to","for","a","training","subset","for","model","fitting",".","Examples","--","--","--","--","--","-","For","usage","examples",",","please","see","https",":","\/\/rasbt.github.io\/mlxtend\/user_guide\/evaluate\/PredefinedHoldoutSplit\/"]
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 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","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 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])
      train_mask = np.ones(X.shape[0], dtype=np.bool_)
      train_mask[self.valid_indices] = False
      valid_mask = np.where(train_mask, False, True)
  
      for i in range(1):
          yield ind[train_mask], ind[valid_mask]
  
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 PredefinedHoldoutSplit obj's underlying member method code with example usage: obj.split(X, y, groups) without return types