class_docstr: Signal decomposition using the Spatio-Spectral Decomposition (SSD).
  
  SSD seeks to maximize the power at a frequency band of interest while
  simultaneously minimizing it at the flanking (surrounding) frequency bins
  (considered noise). It extremizes the covariance matrices associated with
  signal and noise :footcite:`NikulinEtAl2011`.
  
  SSD can either be used as a dimensionality reduction method or a
  ‘denoised’ low rank factorization method :footcite:`HaufeEtAl2014b`.
  
  Parameters
  ----------
  %(info_not_none)s Must match the input data.
  filt_params_signal : dict
      Filtering for the frequencies of interest.
  filt_params_noise : dict
      Filtering for the frequencies of non-interest.
  reg : float | str | None (default)
      Which covariance estimator to use.
      If not None (same as 'empirical'), allow regularization for covariance
      estimation. If float, shrinkage is used (0 <= shrinkage <= 1). For str
      options, reg will be passed to method :func:`mne.compute_covariance`.
  n_components : int | None (default None)
      The number of components to extract from the signal.
      If None, the number of components equal to the rank of the data are
      returned (see ``rank``).
  picks : array of int | None (default None)
      The indices of good channels.
  sort_by_spectral_ratio : bool (default True)
      If set to True, the components are sorted according to the spectral
      ratio.
      See Eq. (24) in :footcite:`NikulinEtAl2011`.
  return_filtered : bool (default False)
      If return_filtered is True, data is bandpassed and projected onto the
      SSD components.
  n_fft : int (default None)
     If sort_by_spectral_ratio is set to True, then the SSD sources will be
     sorted according to their spectral ratio which is calculated based on
     :func:`mne.time_frequency.psd_array_welch`. The n_fft parameter sets the
     length of FFT used.
     See :func:`mne.time_frequency.psd_array_welch` for more information.
  cov_method_params : dict | None (default None)
      As in :class:`mne.decoding.SPoC`
      The default is None.
  rank : None | dict | ‘info’ | ‘full’
      As in :class:`mne.decoding.SPoC`
      This controls the rank computation that can be read from the
      measurement info or estimated from the data, which determines the
      maximum possible number of components.
      See Notes of :func:`mne.compute_rank` for details.
      We recommend to use 'full' when working with epoched data.
  
  Attributes
  ----------
  filters_ : array, shape (n_channels, n_components)
      The spatial filters to be multiplied with the signal.
  patterns_ : array, shape (n_components, n_channels)
      The patterns for reconstructing the signal from the filtered data.
  
  References
  ----------
  .. footbibliography::
docstr: Initialize instance.
docstr_tok: ["Initialize","instance","."]
code: def __init__(
      self,
      info,
      filt_params_signal,
      filt_params_noise,
      reg=None,
      n_components=None,
      picks=None,
      sort_by_spectral_ratio=True,
      return_filtered=False,
      n_fft=None,
      cov_method_params=None,
      rank=None,
  ):
      """Initialize instance."""
      dicts = {"signal": filt_params_signal, "noise": filt_params_noise}
      for param, dd in [("l", 0), ("h", 0), ("l", 1), ("h", 1)]:
          key = ("signal", "noise")[dd]
          if param + "_freq" not in dicts[key]:
              raise ValueError(
                  f"{param + '_freq'} must be defined in filter parameters for {key}"
              )
          val = dicts[key][param + "_freq"]
          if not isinstance(val, (int, float)):
              _validate_type(val, ("numeric",), f"{key} {param}_freq")
      # check freq bands
      if (
          filt_params_noise["l_freq"] > filt_params_signal["l_freq"]
          or filt_params_signal["h_freq"] > filt_params_noise["h_freq"]
      ):
          raise ValueError(
              "Wrongly specified frequency bands!\n"
              "The signal band-pass must be within the noise "
              "band-pass!"
          )
      self.picks_ = _picks_to_idx(
          info, picks, none="data", exclude="bads"
      )
      del picks
      ch_types = info.get_channel_types(picks=self.picks_, unique=True)
      if len(ch_types) > 1:
          raise ValueError(
              "At this point SSD only supports fitting "
              "single channel types. Your info has %i types"
              % (len(ch_types))
          )
      self.info = info
      self.freqs_signal = (
          filt_params_signal["l_freq"],
          filt_params_signal["h_freq"],
      )
      self.freqs_noise = (
          filt_params_noise["l_freq"],
          filt_params_noise["h_freq"],
      )
      self.filt_params_signal = filt_params_signal
      self.filt_params_noise = filt_params_noise
      # check if boolean
      if not isinstance(sort_by_spectral_ratio, (bool)):
          raise ValueError("sort_by_spectral_ratio must be boolean")
      self.sort_by_spectral_ratio = sort_by_spectral_ratio
      if n_fft is None:
          self.n_fft = int(self.info["sfreq"])
      else:
          self.n_fft = int(n_fft)
      # check if boolean
      if not isinstance(return_filtered, (bool)):
          raise ValueError("return_filtered must be boolean")
      self.return_filtered = return_filtered
      self.reg = reg
      self.n_components = n_components
      self.rank = rank
      self.cov_method_params = cov_method_params
  
imports: import numpy
  from scipy.linalg import eigh
  from .._fiff.pick import _picks_to_idx
  from ..cov import Covariance, _regularized_covariance
  from ..defaults import _handle_default
  from ..filter import filter_data
  from ..fixes import BaseEstimator
  from ..rank import compute_rank
  from ..time_frequency import psd_array_welch
  from ..utils import _check_option, _time_mask, _validate_type, _verbose_safe_false, fill_doc, logger
  from .mixin import TransformerMixin
label_desc: Use image node_id 1 to create a new SSD object from inherited base classes: BaseEstimator, TransformerMixin with example: obj = SSD(info, filt_params_signal, filt_params_noise, reg, n_components, picks, sort_by_spectral_ratio, return_filtered, n_fft, cov_method_params, rank)