class_docstr: Xdawn algorithm.
  
  Xdawn [1]_ is a spatial filtering method designed to improve the signal
  to signal + noise ratio (SSNR) of the ERP responses. Xdawn was originaly
  designed for P300 evoked potential by enhancing the target response with
  respect to the non-target response [2]_. This implementation is a
  generalization to any type of ERP.
  
  Parameters
  ----------
  nfilter : int, default=4
      The number of components to decompose M/EEG signals.
  classes : list of int | None, default=None
      List of classes to take into account for Xdawn.
      If None, all classes will be accounted.
  estimator : string, default='scm'
      Covariance matrix estimator, see
      :func:`pyriemann.utils.covariance.covariances`.
  baseline_cov : None | array, shape(n_channels, n_channels), default=None
      Covariance matrix to which the average signals are compared. If None,
      the baseline covariance is computed across all trials and time samples.
  
  Attributes
  ----------
  classes_ : ndarray, shape (n_classes,)
      Labels for each class.
  filters_ : ndarray, shape (n_classes x min(n_channels, n_filters),             n_channels)
      If fit, the Xdawn components used to decompose the data for each event
      type, concatenated.
  patterns_ : ndarray, shape (n_classes x min(n_channels, n_filters),             n_channels)
      If fit, the Xdawn patterns used to restore M/EEG signals for each event
      type, concatenated.
  evokeds_ : ndarray, shape (n_classes x min(n_channels, n_filters), n_times)
      If fit, the evoked response for each event type, concatenated.
  
  See Also
  --------
  XdawnCovariances
  
  References
  ----------
  .. [1] `xDAWN algorithm to enhance evoked potentials: application to
      brain-computer interface
      <https://hal.archives-ouvertes.fr/hal-00454568/fr/>`_
      B. Rivet, A. Souloumiac, V. Attina, and G. Gibert. IEEE Transactions on
      Biomedical Engineering, 2009, 56 (8), pp.2035-43.
  .. [2] `Theoretical analysis of xDAWN algorithm: application to an
      efficient sensor selection in a P300 BCI
      <https://hal.archives-ouvertes.fr/hal-00619997>`_
      B. Rivet, H. Cecotti, A. Souloumiac, E. Maby, J. Mattout. EUSIPCO 2011
      19th European Signal Processing Conference, Aug 2011, Barcelone, Spain.
      pp.1382-1386.
code: def estimator_fn(self):
      return _check_cov_est_function(self.estimator)
  
imports: import warnings
  import numpy
  from scipy.linalg import eigh, inv
  from sklearn.base import BaseEstimator, TransformerMixin
  from .utils.covariance import _check_cov_est_function, normalize, get_nondiag_weight
  from .utils.mean import mean_covariance
  from .utils.ajd import ajd_pham
  from .None import estimation
  from .preprocessing import Whitening
label_desc: Use image node_id 2 for calling the Xdawn obj's underlying member method code with example usage: obj.estimator_fn() and returns: _check_cov_est_function