Nonlinear Energy

Description

This module implements the Nonlinear Energy feature extractor, which estimates the energy of EEG signals using a nonlinear transformation. This feature is useful for capturing nonlinear dynamics and transient events in brain activity, making it suitable for tasks like seizure detection or event-related potential (ERP) analysis.

The Nonlinear Energy is calculated as the sum of the squared amplitude of the signal minus the product of adjacent samples.

Class

class bciflow.modules.fe.nonlinearenergy.nonlinearenergy(flating: bool = False)[source]

Bases: object

flating

If True, the output data is returned in a flattened format (default is False).

Type:

bool

fit(eegdata)[source]

This method does nothing, as the Nonlinear Energy feature extractor does not require training.

Parameters:

eegdata (dict) – The input data.

Return type:

self

fit_transform(eegdata) dict[source]

This method combines fitting and transforming into a single step. It returns a dictionary with the transformed data.

Parameters:

eegdata (dict) – The input data.

Returns:

output – The transformed data.

Return type:

dict

transform(eegdata) dict[source]

This method computes the Nonlinear Energy for each trial, band, and channel in the input data. The result is stored in the dictionary under the key ‘X’.

Parameters:

eegdata (dict) – The input data.

Returns:

output – The transformed data.

Return type:

dict