class_docstr: Class for handling the cross-validation splits of multi-domain data.
  
  This is a wrapper to sklearn's cross-validation iterators [1]_ which
  ensures the handling of domain information with the data points. In fact,
  the data from source domain is always fully available in the training
  partition whereas the random splits are done on the data points from the
  target domain.
  
  Parameters
  ----------
  target_domain : str
      Domain considered as target.
  cv : None | BaseCrossValidator | BaseShuffleSplit, default=None
      An instance of a cross validation iterator from sklearn.
  
  References
  ----------
  .. [1] https://scikit-learn.org/stable/modules/cross_validation.html#cross-validation-iterators
  
  Notes
  -----
  .. versionadded:: 0.4
docstr: Generate indices to split data into training and test set.
  
  Parameters
  ----------
  X : ndarray, shape (n_matrices, n_channels, n_channels)
      Set of SPD matrices.
  y : ndarray, shape (n_matrices,)
      Extended labels for each matrix.
  
  Yields
  ------
  train : ndarray
      The training set indices for that split.
  test : ndarray
      The testing set indices for that split.
docstr_tok: ["Generate","indices","to","split","data","into","training","and","test","set",".","Parameters","--","--","--","--","--","X",":","ndarray",",","shape","(","n_matrices",",","n_channels",",","n_channels",")","Set","of","SPD","matrices",".","y",":","ndarray",",","shape","(","n_matrices",",",")","Extended","labels","for","each","matrix",".","Yields","--","--","--","train",":","ndarray","The","training","set","indices","for","that","split",".","test",":","ndarray","The","testing","set","indices","for","that","split","."]
code: def split(self, X, y):
      """Generate indices to split data into training and test set.
  
      Parameters
      ----------
      X : ndarray, shape (n_matrices, n_channels, n_channels)
          Set of SPD matrices.
      y : ndarray, shape (n_matrices,)
          Extended labels for each matrix.
  
      Yields
      ------
      train : ndarray
          The training set indices for that split.
      test : ndarray
          The testing set indices for that split.
      """
  
      # decode the domains of the data points
      X, y, domain = decode_domains(X, y)
  
      # indentify the indices of the target dataset
      idx_source = np.where(domain != self.target_domain)[0]
      idx_target = np.where(domain == self.target_domain)[0]
      y_target = y[idx_target]
  
      # index of training-split for the target data points
      ss_target = self.cv.split(idx_target, y_target)
      for train_sub_idx_target, test_sub_idx_target in ss_target:
          train_idx = np.concatenate(
              [idx_source, idx_target[train_sub_idx_target]]
          )
          test_idx = idx_target[test_sub_idx_target]
          yield train_idx, test_idx
  
imports: import numpy
label_desc: Use image node_id 2 for calling the TLSplitter obj's underlying member method code with example usage: obj.split(X, y) without return types