mne_features.feature_extraction
.extract_features¶Extraction of temporal or spectral features from epoched EEG signals.
Array of epoched EEG data.
Sampling rate of the data.
The elements of selected_features
are either strings or tuples of
the form (str, callable)
. If an element is of type str
, it is
the alias of a feature function. The aliases are built from the
feature functions’ names by removing compute_
. For instance, the
alias of the feature function compute_ptp_amp()
is ptp_amp
.
(See the documentation of mne-features). If an element is of type
tuple
, the first element of the tuple should be a string
(name/alias given to a user-defined feature function) and the second
element should be a callable (a user-defined feature function which
accepts Numpy arrays with shape (n_channels, n_times)
). The
names/aliases given to user-defined feature functions should not
intersect the aliases used by mne-features. If the name given to a
user-defined feature function is already used as an alias in
mne-features, an error will be raised.
If not None, dict of optional parameters to be passed to the feature
functions. Each key of the funcs_params
dict should be of the form:
[alias_feature_function]__[optional_param]
(for example:
higuchi_fd__kmax
).
Number of CPU cores used when parallelizing the feature extraction. If given a value of -1, all cores are used.
If not None, list containing the names of each input channel.
If True, the extracted features will be returned as a Pandas DataFrame.
The column index is a MultiIndex (see MultiIndex
)
which contains the alias of each feature function which was used.
If False, the features are returned as a 2d Numpy array.