FilterBank#
- class dpeeg.transforms.FilterBank(freq: float, filter_bank: list = [[4, 8], [8, 12], [12, 16], [16, 20], [20, 24], [24, 28], [28, 32], [32, 36], [36, 40]], transition_bandwidth: float = 2.0, gstop: float = 30, gpass: float = 3)[source]#
Filter Bank.
EEG data will be filtered according to different filtering frequencies and finally concatenated together. eg.`(Batch, …) -> (Batch, F, …)` if the number of filter banks exceeds 1, (Batch, …) -> (Batch, …) if the filter has only one. By default, filtering is performed on edata, please ensure the availability of the data. Related references include [1] and [2].
- Parameters:
freq (float) – EEG data sampling frequency.
filter_bank (multiple 2 float of list) – The low-pass and high-pass cutoff frequencies for each filter set.
transition_bandwidth (float) – The bandwidth (in hertz) of the transition region of the frequency response from the passband to the stopband.
gstop (float) – The minimum attenuation in the stopband (dB).
gpass (float) – The maximum loss in the passband (dB).
- Returns:
data – Transformed eegdata.
- Return type:
eegdata or dataset
References
Examples
>>> eegdata = dpeeg.EEGData(edata=np.random.randn(16, 3, 10), ... label=np.random.randint(0, 3, 16)) >>> transforms.FilterBank(250)(eegdata, verbose=False) [edata=(16, 9, 3, 10), label=(16,)]