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: Remove selected components from the signal.
  
  Given the unmixing matrix, transform data, zero out components,
  and inverse transform the data. This procedure will reconstruct
  the signals from which the dynamics described by the excluded
  components is subtracted.
  
  Parameters
  ----------
  X : array, shape (n_epochs, n_components * n_classes, n_times)
      The transformed data.
  
  Returns
  -------
  X : array, shape (n_epochs, n_channels * n_classes, n_times)
      The inverse transform data.
docstr_tok: ["Remove","selected","components","from","the","signal",".","Given","the","unmixing","matrix",",","transform","data",",","zero","out","components",",","and","inverse","transform","the","data",".","This","procedure","will","reconstruct","the","signals","from","which","the","dynamics","described","by","the","excluded","components","is","subtracted",".","Parameters","--","--","--","--","--","X",":","array",",","shape","(","n_epochs",",","n_components","*","n_classes",",","n_times",")","The","transformed","data",".","Returns","--","--","--","-","X",":","array",",","shape","(","n_epochs",",","n_channels","*","n_classes",",","n_times",")","The","inverse","transform","data","."]
code: def inverse_transform(self, X):
      """Remove selected components from the signal.
  
      Given the unmixing matrix, transform data, zero out components,
      and inverse transform the data. This procedure will reconstruct
      the signals from which the dynamics described by the excluded
      components is subtracted.
  
      Parameters
      ----------
      X : array, shape (n_epochs, n_components * n_classes, n_times)
          The transformed data.
  
      Returns
      -------
      X : array, shape (n_epochs, n_channels * n_classes, n_times)
          The inverse transform data.
      """
      # Check size
      X, _ = self._check_Xy(X)
      n_epochs, n_comp, n_times = X.shape
      if n_comp != (self.n_components * len(self.classes_)):
          raise ValueError(
              "X must have %i components, got %i instead"
              % (self.n_components * len(self.classes_), n_comp)
          )
  
      # Transform
      return np.dot(self.patterns_.T, X).transpose(1, 0, 2)
  
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 4 for calling the _XdawnTransformer obj's underlying member method code with example usage: obj.inverse_transform(X) and returns: np