This documentation is for development version 0.18.dev0.

mne.decoding.PSDEstimator

class mne.decoding.PSDEstimator(sfreq=6.283185307179586, fmin=0, fmax=inf, bandwidth=None, adaptive=False, low_bias=True, n_jobs=1, normalization='length', verbose=None)[source]

Compute power spectrum density (PSD) using a multi-taper method.

Parameters:
sfreq : float

The sampling frequency.

fmin : float

The lower frequency of interest.

fmax : float

The upper frequency of interest.

bandwidth : float

The bandwidth of the multi taper windowing function in Hz.

adaptive : bool

Use adaptive weights to combine the tapered spectra into PSD (slow, use n_jobs >> 1 to speed up computation).

low_bias : bool

Only use tapers with more than 90{‘verbose’: ‘n verbose : bool, str, int, or Nonen If not None, override default verbose level (see mne.verbose()n and Logging documentation for more).’, ‘verbose_meth’: ‘n verbose : bool, str, int, or Nonen If not None, override default verbose level (see mne.verbose()n and Logging documentation for more). Defaults to self.verbose.’, ‘picks_header’: ‘picks : str | list | slice | None’, ‘picks_base’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick ‘, ‘picks_all’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick all channels.’, ‘picks_all_data’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick all data channels.’, ‘picks_all_data_noref’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick all data channels(excluding reference MEG channels).’, ‘picks_good_data’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick good data channels.’, ‘picks_good_data_noref’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick good data channels(excluding reference MEG channels).’, ‘picks_nostr’: ‘n picks : list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. None (default) will pick all channels.’}pectral concentration within bandwidth.

n_jobs : int

Number of parallel jobs to use (only used if adaptive=True).

normalization : str

Either “full” or “length” (default). If “full”, the PSD will be normalized by the sampling rate as well as the length of the signal (as in nitime).

verbose : bool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

Methods

__hash__($self, /) Return hash(self).
fit(epochs_data, y) Compute power spectrum density (PSD) using a multi-taper method.
fit_transform(X[, y]) Fit to data, then transform it.
transform(epochs_data) Compute power spectrum density (PSD) using a multi-taper method.
__hash__($self, /)

Return hash(self).

fit(epochs_data, y)[source]

Compute power spectrum density (PSD) using a multi-taper method.

Parameters:
epochs_data : array, shape (n_epochs, n_channels, n_times)

The data.

y : array, shape (n_epochs,)

The label for each epoch

Returns:
self : instance of PSDEstimator

returns the modified instance

fit_transform(X, y=None, **fit_params)[source]

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

Parameters:
X : array, shape (n_samples, n_features)

Training set.

y : array, shape (n_samples,)

Target values.

Returns:
X_new : array, shape (n_samples, n_features_new)

Transformed array.

transform(epochs_data)[source]

Compute power spectrum density (PSD) using a multi-taper method.

Parameters:
epochs_data : array, shape (n_epochs, n_channels, n_times)

The data

Returns:
psd : array, shape (n_signals, n_freqs) or (n_freqs,)

The computed PSD.