class_docstr: Multilabel Stratified ShuffleSplit cross-validator
  Provides train/test indices to split data into train/test sets.
  This cross-validation object is a merge of MultilabelStratifiedKFold and
  ShuffleSplit, which returns stratified randomized folds for multilabel
  data. The folds are made by preserving the percentage of each label.
  Note: like the ShuffleSplit strategy, multilabel stratified random splits
  do not guarantee that all folds will be different, although this is
  still very likely for sizeable datasets.
  Parameters
  ----------
  n_splits : int, default 10
      Number of re-shuffling & splitting iterations.
  test_size : float, int, None, optional
      If float, should be between 0.0 and 1.0 and represent the proportion
      of the dataset to include in the test split. If int, represents the
      absolute number of test samples. If None, the value is set to the
      complement of the train size. By default, the value is set to 0.1.
      The default will change in version 0.21. It will remain 0.1 only
      if ``train_size`` is unspecified, otherwise it will complement
      the specified ``train_size``.
  train_size : float, int, or None, default is None
      If float, should be between 0.0 and 1.0 and represent the
      proportion of the dataset to include in the train split. If
      int, represents the absolute number of train samples. If None,
      the value is automatically set to the complement of the test size.
  random_state : int, RandomState instance or None, optional (default=None)
      If int, random_state is the seed used by the random number generator;
      If RandomState instance, random_state is the random number generator;
      If None, the random number generator is the RandomState instance used
      by `np.random`. Unlike StratifiedShuffleSplit that only uses
      random_state when ``shuffle`` == True, this multilabel implementation
      always uses the random_state since the iterative stratification
      algorithm breaks ties randomly.
  Examples
  --------
  >>> from iterstrat.ml_stratifiers import MultilabelStratifiedShuffleSplit
  >>> import numpy as np
  >>> X = np.array([[1,2], [3,4], [1,2], [3,4], [1,2], [3,4], [1,2], [3,4]])
  >>> y = np.array([[0,0], [0,0], [0,1], [0,1], [1,1], [1,1], [1,0], [1,0]])
  >>> msss = MultilabelStratifiedShuffleSplit(n_splits=3, test_size=0.5,
  ...    random_state=0)
  >>> msss.get_n_splits(X, y)
  3
  >>> print(mss)       # doctest: +ELLIPSIS
  MultilabelStratifiedShuffleSplit(n_splits=3, random_state=0, test_size=0.5,
                                   train_size=None)
  >>> for train_index, test_index in msss.split(X, y):
  ...    print("TRAIN:", train_index, "TEST:", test_index)
  ...    X_train, X_test = X[train_index], X[test_index]
  ...    y_train, y_test = y[train_index], y[test_index]
  TRAIN: [1 2 5 7] TEST: [0 3 4 6]
  TRAIN: [2 3 6 7] TEST: [0 1 4 5]
  TRAIN: [1 2 5 6] TEST: [0 3 4 7]
  Notes
  -----
  Train and test sizes may be slightly different from desired due to the
  preference of stratification over perfectly sized folds.
class_docstr_tok: ["Multilabel","Stratified","ShuffleSplit","cross-validator","Provides","train\/test","indices","to","split","data","into","train\/test","sets",".","This","cross-validation","object","is","a","merge","of","MultilabelStratifiedKFold","and","ShuffleSplit",",","which","returns","stratified","randomized","folds","for","multilabel","data",".","The","folds","are","made","by","preserving","the","percentage","of","each","label",".","Note",":","like","the","ShuffleSplit","strategy",",","multilabel","stratified","random","splits","do","not","guarantee","that","all","folds","will","be","different",",","although","this","is","still","very","likely","for","sizeable","datasets",".","Parameters","--","--","--","--","--","n_splits",":","int",",","default","10","Number","of","re-shuffling","&","splitting","iterations",".","test_size",":","float",",","int",",","None",",","optional","If","float",",","should","be","between","0.0","and","1.0","and","represent","the","proportion","of","the","dataset","to","include","in","the","test","split",".","If","int",",","represents","the","absolute","number","of","test","samples",".","If","None",",","the","value","is","set","to","the","complement","of","the","train","size",".","By","default",",","the","value","is","set","to","0.1",".","The","default","will","change","in","version","0.21",".","It","will","remain","0.1","only","if","``","train_size","``","is","unspecified",",","otherwise","it","will","complement","the","specified","``","train_size","``",".","train_size",":","float",",","int",",","or","None",",","default","is","None","If","float",",","should","be","between","0.0","and","1.0","and","represent","the","proportion","of","the","dataset","to","include","in","the","train","split",".","If","int",",","represents","the","absolute","number","of","train","samples",".","If","None",",","the","value","is","automatically","set","to","the","complement","of","the","test","size",".","random_state",":","int",",","RandomState","instance","or","None",",","optional","(","default=None",")","If","int",",","random_state","is","the","seed","used","by","the","random","number","generator",";","If","RandomState","instance",",","random_state","is","the","random","number","generator",";","If","None",",","the","random","number","generator","is","the","RandomState","instance","used","by","`","np.random","`",".","Unlike","StratifiedShuffleSplit","that","only","uses","random_state","when","``","shuffle","``","==","True",",","this","multilabel","implementation","always","uses","the","random_state","since","the","iterative","stratification","algorithm","breaks","ties","randomly",".","Examples","--","--","--","--",">",">",">","from","iterstrat.ml_stratifiers","import","MultilabelStratifiedShuffleSplit",">",">",">","import","numpy","as","np",">",">",">","X","=","np.array","(","[","[","1,2","]",",","[","3,4","]",",","[","1,2","]",",","[","3,4","]",",","[","1,2","]",",","[","3,4","]",",","[","1,2","]",",","[","3,4","]","]",")",">",">",">","y","=","np.array","(","[","[","0,0","]",",","[","0,0","]",",","[","0,1","]",",","[","0,1","]",",","[","1,1","]",",","[","1,1","]",",","[","1,0","]",",","[","1,0","]","]",")",">",">",">","msss","=","MultilabelStratifiedShuffleSplit","(","n_splits=3",",","test_size=0.5",",","...","random_state=0",")",">",">",">","msss.get_n_splits","(","X",",","y",")","3",">",">",">","print","(","mss",")","#","doctest",":","+ELLIPSIS","MultilabelStratifiedShuffleSplit","(","n_splits=3",",","random_state=0",",","test_size=0.5",",","train_size=None",")",">",">",">","for","train_index",",","test_index","in","msss.split","(","X",",","y",")",":","...","print","(","``","TRAIN",":","''",",","train_index",",","``","TEST",":","''",",","test_index",")","...","X_train",",","X_test","=","X","[","train_index","]",",","X","[","test_index","]","...","y_train",",","y_test","=","y","[","train_index","]",",","y","[","test_index","]","TRAIN",":","[","1","2","5","7","]","TEST",":","[","0","3","4","6","]","TRAIN",":","[","2","3","6","7","]","TEST",":","[","0","1","4","5","]","TRAIN",":","[","1","2","5","6","]","TEST",":","[","0","3","4","7","]","Notes","--","--","-","Train","and","test","sizes","may","be","slightly","different","from","desired","due","to","the","preference","of","stratification","over","perfectly","sized","folds","."]
docstr: Generate indices to split data into training and test set.
  Parameters
  ----------
  X : array-like, shape (n_samples, n_features)
      Training data, where n_samples is the number of samples
      and n_features is the number of features.
      Note that providing ``y`` is sufficient to generate the splits and
      hence ``np.zeros(n_samples)`` may be used as a placeholder for
      ``X`` instead of actual training data.
  y : array-like, shape (n_samples, n_labels)
      The target variable for supervised learning problems.
      Multilabel stratification is done based on the y labels.
  groups : object
      Always ignored, exists for compatibility.
  Returns
  -------
  train : ndarray
      The training set indices for that split.
  test : ndarray
      The testing set indices for that split.
  Notes
  -----
  Randomized CV splitters may return different results for each call of
  split. You can make the results identical by setting ``random_state``
  to an integer.
docstr_tok: ["Generate","indices","to","split","data","into","training","and","test","set",".","Parameters","--","--","--","--","--","X",":","array-like",",","shape","(","n_samples",",","n_features",")","Training","data",",","where","n_samples","is","the","number","of","samples","and","n_features","is","the","number","of","features",".","Note","that","providing","``","y","``","is","sufficient","to","generate","the","splits","and","hence","``","np.zeros","(","n_samples",")","``","may","be","used","as","a","placeholder","for","``","X","``","instead","of","actual","training","data",".","y",":","array-like",",","shape","(","n_samples",",","n_labels",")","The","target","variable","for","supervised","learning","problems",".","Multilabel","stratification","is","done","based","on","the","y","labels",".","groups",":","object","Always","ignored",",","exists","for","compatibility",".","Returns","--","--","--","-","train",":","ndarray","The","training","set","indices","for","that","split",".","test",":","ndarray","The","testing","set","indices","for","that","split",".","Notes","--","--","-","Randomized","CV","splitters","may","return","different","results","for","each","call","of","split",".","You","can","make","the","results","identical","by","setting","``","random_state","``","to","an","integer","."]
code: def split(self, X, y, groups=None):
      """Generate indices to split data into training and test set.
      Parameters
      ----------
      X : array-like, shape (n_samples, n_features)
          Training data, where n_samples is the number of samples
          and n_features is the number of features.
          Note that providing ``y`` is sufficient to generate the splits and
          hence ``np.zeros(n_samples)`` may be used as a placeholder for
          ``X`` instead of actual training data.
      y : array-like, shape (n_samples, n_labels)
          The target variable for supervised learning problems.
          Multilabel stratification is done based on the y labels.
      groups : object
          Always ignored, exists for compatibility.
      Returns
      -------
      train : ndarray
          The training set indices for that split.
      test : ndarray
          The testing set indices for that split.
      Notes
      -----
      Randomized CV splitters may return different results for each call of
      split. You can make the results identical by setting ``random_state``
      to an integer.
      """
      y = check_array(y, ensure_2d=False, dtype=None)
      return super(MultilabelStratifiedShuffleSplit, self).split(
          X, y, groups
      )
  
file_path: iterative-stratification/iterstrat/ml_stratifiers.py
imports: import numpy
  from sklearn.utils import check_random_state
  from sklearn.utils.validation import _num_samples, check_array
  from sklearn.utils.multiclass import type_of_target
  from sklearn.model_selection._split import _BaseKFold, _RepeatedSplits, BaseShuffleSplit, _validate_shuffle_split
label_desc: Use image node_id 3 for calling the MultilabelStratifiedShuffleSplit obj's underlying member method code with example usage: obj.split(X, y, groups) and returns: super