mne_features.univariate.compute_spect_slope

mne_features.univariate.compute_spect_slope(sfreq, data, fmin=0.1, fmax=50, with_intercept=True, psd_method='welch', psd_params=None)

Linear regression of the the log-log frequency-curve (per channel).

Using a linear regression, the function estimates the slope and the intercept (if with_intercept is True) of the Power Spectral Density (PSD) in the log-log scale. In addition to this, the Mean Square Error (MSE) and R2 coefficient (goodness-of-fit) are returned. By default, the [0.1Hz, 50Hz] frequency range is used for the regression.

Parameters
sfreqfloat

Sampling rate of the data.

datandarray, shape (n_channels, n_times)
fminfloat (default: 0.1)

Lower bound of the frequency range considered in the linear regression.

fmaxfloat (default: 50)

Upper bound of the frequency range considered in the linear regression.

with_interceptbool (default: True)

If True, the intercept of the linear regression is included among the features returned by the function. If False, only the slope, the MSE and the R2 coefficient are returned.

psd_methodstr (default: ‘welch’)

Method used for the estimation of the Power Spectral Density (PSD). Valid methods are: 'welch', 'multitaper' or 'fft'.

psd_paramsdict or None (default: None)

If not None, dict with optional parameters (welch_n_fft, welch_n_per_seg, welch_n_overlap) to be passed to mne_features.utils.power_spectrum(). If None, default parameters are used (see doc for mne_features.utils.power_spectrum()).

Returns
outputndarray, shape (n_channels * 4,)

The four characteristics: intercept, slope, MSE, and R2 per channel.

Notes

Alias of the feature function: spect_slope. See [1] and [2].

References

1

Demanuelle C. et al. (2007). Distinguishing low frequency oscillations within the 1/f spectral behaviour of electromagnetic brain signals. Behavioral and Brain Functions (BBF).

2

Winkler I. et al. (2011). Automatic Classification of Artifactual ICA-Components for Artifact Removal in EEG Signals. Behavioral and Brain Functions (BBF).

Fork me on GitHub