class_docstr: Implementation of the Xdawn Algorithm compatible with scikit-learn.
  
  Xdawn is a spatial filtering method designed to improve the signal
  to signal + noise ratio (SSNR) of the event related responses. Xdawn was
  originally designed for P300 evoked potential by enhancing the target
  response with respect to the non-target response. This implementation is a
  generalization to any type of event related response.
  
  .. note:: _XdawnTransformer does not correct for epochs overlap. To correct
            overlaps see ``Xdawn``.
  
  Parameters
  ----------
  n_components : int (default 2)
      The number of components to decompose the signals.
  reg : float | str | None (default None)
      If not None (same as ``'empirical'``, default), allow
      regularization for covariance estimation.
      If float, shrinkage is used (0 <= shrinkage <= 1).
      For str options, ``reg`` will be passed to ``method`` to
      :func:`mne.compute_covariance`.
  signal_cov : None | Covariance | array, shape (n_channels, n_channels)
      The signal covariance used for whitening of the data.
      if None, the covariance is estimated from the epochs signal.
  method_params : dict | None
      Parameters to pass to :func:`mne.compute_covariance`.
  
      .. versionadded:: 0.16
  
  Attributes
  ----------
  classes_ : array, shape (n_classes)
      The event indices of the classes.
  filters_ : array, shape (n_channels, n_channels)
      The Xdawn components used to decompose the data for each event type.
  patterns_ : array, shape (n_channels, n_channels)
      The Xdawn patterns used to restore the signals for each event type.
docstr: Transform data with spatial filters.
  
  Parameters
  ----------
  X : array, shape (n_epochs, n_channels, n_samples)
      The target data.
  
  Returns
  -------
  X : array, shape (n_epochs, n_components * n_classes, n_samples)
      The transformed data.
docstr_tok: ["Transform","data","with","spatial","filters",".","Parameters","--","--","--","--","--","X",":","array",",","shape","(","n_epochs",",","n_channels",",","n_samples",")","The","target","data",".","Returns","--","--","--","-","X",":","array",",","shape","(","n_epochs",",","n_components","*","n_classes",",","n_samples",")","The","transformed","data","."]
code: def transform(self, X):
      """Transform data with spatial filters.
  
      Parameters
      ----------
      X : array, shape (n_epochs, n_channels, n_samples)
          The target data.
  
      Returns
      -------
      X : array, shape (n_epochs, n_components * n_classes, n_samples)
          The transformed data.
      """
      X, _ = self._check_Xy(X)
  
      # Check size
      if self.filters_.shape[1] != X.shape[1]:
          raise ValueError(
              "X must have %i channels, got %i instead."
              % (self.filters_.shape[1], X.shape[1])
          )
  
      # Transform
      X = np.dot(self.filters_, X)
      X = X.transpose((1, 0, 2))
      return X
  
imports: import numpy
  from scipy import linalg
  from .._fiff.pick import _pick_data_channels, pick_info
  from ..cov import Covariance, _regularized_covariance
  from ..decoding import BaseEstimator, TransformerMixin
  from ..epochs import BaseEpochs
  from ..evoked import Evoked, EvokedArray
  from ..io import BaseRaw
  from ..utils import _check_option, logger
label_desc: Use image node_id 3 for calling the _XdawnTransformer obj's underlying member method code with example usage: obj.transform(X) and returns: X