class_docstr: Implementation of the Xdawn Algorithm.
  
  Xdawn :footcite:`RivetEtAl2009,RivetEtAl2011` is a spatial
  filtering method designed to improve the signal to signal + noise
  ratio (SSNR) of the ERP 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 ERP.
  
  Parameters
  ----------
  n_components : int, (default 2)
      The number of components to decompose the signals.
  signal_cov : None | Covariance | ndarray, shape (n_channels, n_channels)
      (default None). The signal covariance used for whitening of the data.
      if None, the covariance is estimated from the epochs signal.
  correct_overlap : 'auto' or bool (default 'auto')
      Compute the independent evoked responses per condition, while
      correcting for event overlaps if any. If 'auto', then
      overlapp_correction = True if the events do overlap.
  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 as ``method`` to
      :func:`mne.compute_covariance`.
  
  Attributes
  ----------
  filters_ : dict of ndarray
      If fit, the Xdawn components used to decompose the data for each event
      type, else empty. For each event type, the filters are in the rows of
      the corresponding array.
  patterns_ : dict of ndarray
      If fit, the Xdawn patterns used to restore the signals for each event
      type, else empty.
  evokeds_ : dict of Evoked
      If fit, the evoked response for each event type.
  event_id_ : dict
      The event id.
  correct_overlap_ : bool
      Whether overlap correction was applied.
  
  See Also
  --------
  mne.decoding.CSP, mne.decoding.SPoC
  
  Notes
  -----
  .. versionadded:: 0.10
  
  References
  ----------
  .. footbibliography::
docstr: Init.
docstr_tok: ["Init","."]
code: def __init__(
      self,
      n_components=2,
      signal_cov=None,
      correct_overlap="auto",
      reg=None,
  ):
      """Init."""
      super().__init__(
          n_components=n_components, signal_cov=signal_cov, reg=reg
      )
      self.correct_overlap = _check_option(
          "correct_overlap", correct_overlap, ["auto", True, False]
      )
  
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 1 to create a new Xdawn object from inherited base classes: _XdawnTransformer with example: obj = Xdawn(n_components, signal_cov, correct_overlap, reg)