class_docstr: M/EEG signal decomposition using the Common Spatial Patterns (CSP).
  
  This class can be used as a supervised decomposition to estimate spatial
  filters for feature extraction. CSP in the context of EEG was first
  described in :footcite:`KolesEtAl1990`; a comprehensive tutorial on CSP can
  be found in :footcite:`BlankertzEtAl2008`. Multi-class solving is
  implemented from :footcite:`Grosse-WentrupBuss2008`.
  
  Parameters
  ----------
  n_components : int (default 4)
      The number of components to decompose M/EEG signals. This number should
      be set by cross-validation.
  reg : float | str | None (default None)
      If not None (same as ``'empirical'``, default), allow regularization
      for covariance estimation. If float (between 0 and 1), shrinkage is
      used. For str values, ``reg`` will be passed as ``method`` to
      :func:`mne.compute_covariance`.
  log : None | bool (default None)
      If ``transform_into`` equals ``'average_power'`` and ``log`` is None or
      True, then apply a log transform to standardize features, else features
      are z-scored. If ``transform_into`` is ``'csp_space'``, ``log`` must be
      None.
  cov_est : 'concat' | 'epoch' (default 'concat')
      If ``'concat'``, covariance matrices are estimated on concatenated
      epochs for each class. If ``'epoch'``, covariance matrices are
      estimated on each epoch separately and then averaged over each class.
  transform_into : 'average_power' | 'csp_space' (default 'average_power')
      If 'average_power' then ``self.transform`` will return the average
      power of each spatial filter. If ``'csp_space'``, ``self.transform``
      will return the data in CSP space.
  norm_trace : bool (default False)
      Normalize class covariance by its trace. Trace normalization is a step
      of the original CSP algorithm :footcite:`KolesEtAl1990` to eliminate
      magnitude variations in the EEG between individuals. It is not applied
      in more recent work :footcite:`BlankertzEtAl2008`,
      :footcite:`Grosse-WentrupBuss2008` and can have a negative impact on
      pattern order.
  cov_method_params : dict | None
      Parameters to pass to :func:`mne.compute_covariance`.
  
      .. versionadded:: 0.16
  %(rank_none)s
  
      .. versionadded:: 0.17
  component_order : 'mutual_info' | 'alternate' (default 'mutual_info')
      If ``'mutual_info'`` order components by decreasing mutual information
      (in the two-class case this uses a simplification which orders
      components by decreasing absolute deviation of the eigenvalues from 0.5
      :footcite:`BarachantEtAl2010`). For the two-class case, ``'alternate'``
      orders components by starting with the largest eigenvalue, followed by
      the smallest, the second-to-largest, the second-to-smallest, and so on
      :footcite:`BlankertzEtAl2008`.
  
      .. versionadded:: 0.21
  
  Attributes
  ----------
  filters_ :  ndarray, shape (n_channels, n_channels)
      If fit, the CSP components used to decompose the data, else None.
  patterns_ : ndarray, shape (n_channels, n_channels)
      If fit, the CSP patterns used to restore M/EEG signals, else None.
  mean_ : ndarray, shape (n_components,)
      If fit, the mean squared power for each component.
  std_ : ndarray, shape (n_components,)
      If fit, the std squared power for each component.
  
  See Also
  --------
  mne.preprocessing.Xdawn, SPoC
  
  References
  ----------
  .. footbibliography::
class_docstr_tok: ["M\/EEG","signal","decomposition","using","the","Common","Spatial","Patterns","(","CSP",")",".","This","class","can","be","used","as","a","supervised","decomposition","to","estimate","spatial","filters","for","feature","extraction",".","CSP","in","the","context","of","EEG","was","first","described","in",":","footcite",":","`","KolesEtAl1990","`",";","a","comprehensive","tutorial","on","CSP","can","be","found","in",":","footcite",":","`","BlankertzEtAl2008","`",".","Multi-class","solving","is","implemented","from",":","footcite",":","`","Grosse-WentrupBuss2008","`",".","Parameters","--","--","--","--","--","n_components",":","int","(","default","4",")","The","number","of","components","to","decompose","M\/EEG","signals",".","This","number","should","be","set","by","cross-validation",".","reg",":","float","|","str","|","None","(","default","None",")","If","not","None","(","same","as","``","'empirical","'","``",",","default",")",",","allow","regularization","for","covariance","estimation",".","If","float","(","between","0","and","1",")",",","shrinkage","is","used",".","For","str","values",",","``","reg","``","will","be","passed","as","``","method","``","to",":","func",":","`","mne.compute_covariance","`",".","log",":","None","|","bool","(","default","None",")","If","``","transform_into","``","equals","``","'average_power","'","``","and","``","log","``","is","None","or","True",",","then","apply","a","log","transform","to","standardize","features",",","else","features","are","z-scored",".","If","``","transform_into","``","is","``","'csp_space","'","``",",","``","log","``","must","be","None",".","cov_est",":","'concat","'","|","'epoch","'","(","default","'concat","'",")","If","``","'concat","'","``",",","covariance","matrices","are","estimated","on","concatenated","epochs","for","each","class",".","If","``","'epoch","'","``",",","covariance","matrices","are","estimated","on","each","epoch","separately","and","then","averaged","over","each","class",".","transform_into",":","'average_power","'","|","'csp_space","'","(","default","'average_power","'",")","If","'average_power","'","then","``","self.transform","``","will","return","the","average","power","of","each","spatial","filter",".","If","``","'csp_space","'","``",",","``","self.transform","``","will","return","the","data","in","CSP","space",".","norm_trace",":","bool","(","default","False",")","Normalize","class","covariance","by","its","trace",".","Trace","normalization","is","a","step","of","the","original","CSP","algorithm",":","footcite",":","`","KolesEtAl1990","`","to","eliminate","magnitude","variations","in","the","EEG","between","individuals",".","It","is","not","applied","in","more","recent","work",":","footcite",":","`","BlankertzEtAl2008","`",",",":","footcite",":","`","Grosse-WentrupBuss2008","`","and","can","have","a","negative","impact","on","pattern","order",".","cov_method_params",":","dict","|","None","Parameters","to","pass","to",":","func",":","`","mne.compute_covariance","`",".","..","versionadded",":",":","0.16","%","(","rank_none",")","s","..","versionadded",":",":","0.17","component_order",":","'mutual_info","'","|","'alternate","'","(","default","'mutual_info","'",")","If","``","'mutual_info","'","``","order","components","by","decreasing","mutual","information","(","in","the","two-class","case","this","uses","a","simplification","which","orders","components","by","decreasing","absolute","deviation","of","the","eigenvalues","from","0.5",":","footcite",":","`","BarachantEtAl2010","`",")",".","For","the","two-class","case",",","``","'alternate","'","``","orders","components","by","starting","with","the","largest","eigenvalue",",","followed","by","the","smallest",",","the","second-to-largest",",","the","second-to-smallest",",","and","so","on",":","footcite",":","`","BlankertzEtAl2008","`",".","..","versionadded",":",":","0.21","Attributes","--","--","--","--","--","filters_",":","ndarray",",","shape","(","n_channels",",","n_channels",")","If","fit",",","the","CSP","components","used","to","decompose","the","data",",","else","None",".","patterns_",":","ndarray",",","shape","(","n_channels",",","n_channels",")","If","fit",",","the","CSP","patterns","used","to","restore","M\/EEG","signals",",","else","None",".","mean_",":","ndarray",",","shape","(","n_components",",",")","If","fit",",","the","mean","squared","power","for","each","component",".","std_",":","ndarray",",","shape","(","n_components",",",")","If","fit",",","the","std","squared","power","for","each","component",".","See","Also","--","--","--","--","mne.preprocessing.Xdawn",",","SPoC","References","--","--","--","--","--","..","footbibliography",":",":"]
docstr: Plot topographic filters of components.
  
  The filters are used to extract discriminant neural sources from
  the measured data (a.k.a. the backward model).
  
  Parameters
  ----------
  %(info_not_none)s Used for fitting. If not available, consider using
      :func:`mne.create_info`.
  components : float | array of float | None
     The patterns to plot. If ``None``, all components will be shown.
  %(average_plot_evoked_topomap)s
  %(ch_type_topomap)s
  scalings : dict | float | None
      The scalings of the channel types to be applied for plotting.
      If None, defaults to ``dict(eeg=1e6, grad=1e13, mag=1e15)``.
  %(sensors_topomap)s
  %(show_names_topomap)s
  %(mask_patterns_topomap)s
  %(mask_params_topomap)s
  %(contours_topomap)s
  %(outlines_topomap)s
  %(sphere_topomap_auto)s
  %(image_interp_topomap)s
  %(extrapolate_topomap)s
  
      .. versionadded:: 1.3
  %(border_topomap)s
  
      .. versionadded:: 1.3
  %(res_topomap)s
  %(size_topomap)s
  %(cmap_topomap)s
  %(vlim_plot_topomap_psd)s
  
      .. versionadded:: 1.3
  %(cnorm)s
  
      .. versionadded:: 1.3
  %(colorbar_topomap)s
  %(cbar_fmt_topomap)s
  %(units_topomap)s
  %(axes_evoked_plot_topomap)s
  name_format : str
      String format for topomap values. Defaults to "CSP%%01d".
  %(nrows_ncols_topomap)s
  
      .. versionadded:: 1.3
  %(show)s
  
  Returns
  -------
  fig : instance of matplotlib.figure.Figure
     The figure.
docstr_tok: ["Plot","topographic","filters","of","components",".","The","filters","are","used","to","extract","discriminant","neural","sources","from","the","measured","data","(","a.k.a",".","the","backward","model",")",".","Parameters","--","--","--","--","--","%","(","info_not_none",")","s","Used","for","fitting",".","If","not","available",",","consider","using",":","func",":","`","mne.create_info","`",".","components",":","float","|","array","of","float","|","None","The","patterns","to","plot",".","If","``","None","``",",","all","components","will","be","shown",".","%","(","average_plot_evoked_topomap",")","s","%","(","ch_type_topomap",")","s","scalings",":","dict","|","float","|","None","The","scalings","of","the","channel","types","to","be","applied","for","plotting",".","If","None",",","defaults","to","``","dict","(","eeg=1e6",",","grad=1e13",",","mag=1e15",")","``",".","%","(","sensors_topomap",")","s","%","(","show_names_topomap",")","s","%","(","mask_patterns_topomap",")","s","%","(","mask_params_topomap",")","s","%","(","contours_topomap",")","s","%","(","outlines_topomap",")","s","%","(","sphere_topomap_auto",")","s","%","(","image_interp_topomap",")","s","%","(","extrapolate_topomap",")","s","..","versionadded",":",":","1.3","%","(","border_topomap",")","s","..","versionadded",":",":","1.3","%","(","res_topomap",")","s","%","(","size_topomap",")","s","%","(","cmap_topomap",")","s","%","(","vlim_plot_topomap_psd",")","s","..","versionadded",":",":","1.3","%","(","cnorm",")","s","..","versionadded",":",":","1.3","%","(","colorbar_topomap",")","s","%","(","cbar_fmt_topomap",")","s","%","(","units_topomap",")","s","%","(","axes_evoked_plot_topomap",")","s","name_format",":","str","String","format","for","topomap","values",".","Defaults","to","``","CSP","%","%","01d","''",".","%","(","nrows_ncols_topomap",")","s","..","versionadded",":",":","1.3","%","(","show",")","s","Returns","--","--","--","-","fig",":","instance","of","matplotlib.figure.Figure","The","figure","."]
code: def plot_filters(
      self,
      info,
      components=None,
      *,
      average=None,
      ch_type=None,
      scalings=None,
      sensors=True,
      show_names=False,
      mask=None,
      mask_params=None,
      contours=6,
      outlines="head",
      sphere=None,
      image_interp=_INTERPOLATION_DEFAULT,
      extrapolate=_EXTRAPOLATE_DEFAULT,
      border=_BORDER_DEFAULT,
      res=64,
      size=1,
      cmap="RdBu_r",
      vlim=(None, None),
      cnorm=None,
      colorbar=True,
      cbar_fmt="%3.1f",
      units=None,
      axes=None,
      name_format="CSP%01d",
      nrows=1,
      ncols="auto",
      show=True,
  ):
      """Plot topographic filters of components.
  
      The filters are used to extract discriminant neural sources from
      the measured data (a.k.a. the backward model).
  
      Parameters
      ----------
      %(info_not_none)s Used for fitting. If not available, consider using
          :func:`mne.create_info`.
      components : float | array of float | None
         The patterns to plot. If ``None``, all components will be shown.
      %(average_plot_evoked_topomap)s
      %(ch_type_topomap)s
      scalings : dict | float | None
          The scalings of the channel types to be applied for plotting.
          If None, defaults to ``dict(eeg=1e6, grad=1e13, mag=1e15)``.
      %(sensors_topomap)s
      %(show_names_topomap)s
      %(mask_patterns_topomap)s
      %(mask_params_topomap)s
      %(contours_topomap)s
      %(outlines_topomap)s
      %(sphere_topomap_auto)s
      %(image_interp_topomap)s
      %(extrapolate_topomap)s
  
          .. versionadded:: 1.3
      %(border_topomap)s
  
          .. versionadded:: 1.3
      %(res_topomap)s
      %(size_topomap)s
      %(cmap_topomap)s
      %(vlim_plot_topomap_psd)s
  
          .. versionadded:: 1.3
      %(cnorm)s
  
          .. versionadded:: 1.3
      %(colorbar_topomap)s
      %(cbar_fmt_topomap)s
      %(units_topomap)s
      %(axes_evoked_plot_topomap)s
      name_format : str
          String format for topomap values. Defaults to "CSP%%01d".
      %(nrows_ncols_topomap)s
  
          .. versionadded:: 1.3
      %(show)s
  
      Returns
      -------
      fig : instance of matplotlib.figure.Figure
         The figure.
      """
      if units is None:
          units = "AU"
      if components is None:
          components = np.arange(self.n_components)
  
      # set sampling frequency to have 1 component per time point
      info = cp.deepcopy(info)
      with info._unlock():
          info["sfreq"] = 1.0
      # create an evoked
      filters = EvokedArray(self.filters_.T, info, tmin=0)
      # the call plot_topomap
      fig = filters.plot_topomap(
          times=components,
          average=average,
          ch_type=ch_type,
          scalings=scalings,
          sensors=sensors,
          show_names=show_names,
          mask=mask,
          mask_params=mask_params,
          contours=contours,
          outlines=outlines,
          sphere=sphere,
          image_interp=image_interp,
          extrapolate=extrapolate,
          border=border,
          res=res,
          size=size,
          cmap=cmap,
          vlim=vlim,
          cnorm=cnorm,
          colorbar=colorbar,
          cbar_fmt=cbar_fmt,
          units=units,
          axes=axes,
          time_format=name_format,
          nrows=nrows,
          ncols=ncols,
          show=show,
      )
      return fig
  
imports: import copy
  import numpy
  from scipy.linalg import eigh
  from ..cov import _regularized_covariance
  from ..defaults import _BORDER_DEFAULT, _EXTRAPOLATE_DEFAULT, _INTERPOLATION_DEFAULT
  from ..evoked import EvokedArray
  from ..fixes import pinv
  from ..utils import _check_option, _validate_type, copy_doc, fill_doc
  from .base import BaseEstimator
  from .mixin import TransformerMixin
label_desc: Use image node_id 7 for calling the CSP obj's underlying member method code with example usage: obj.plot_filters(info, components) and returns: fig