neuraltrain.models.freqbandnet.FreqBandNet¶
- class neuraltrain.models.freqbandnet.FreqBandNet(*, sfreq: float | None = None, freq_lims_hz: list[float] | None = [0.1, 0.5, 4.0, 8.0, 12.0, 30.0, 60.0], n_filters_conv: int | None = None, conv_kernel_len: int = 65, conv_stride: int = 1, conv_padding: Literal['valid', 'same'] = 'valid', pool_kernel_len: int = 30, flat_out: Literal['channels', 'channels_and_time'] | None = None, n_outputs: int | None = None)[source][source]¶
Parametrized filterbank feature extractor (sinc filters + power + log).
- Parameters:
sfreq (float or None) – Sampling frequency of the input time series, in Hz. Can also be provided at build time.
freq_lims_hz (list of float or None) – Bandpass cutoff frequencies used to initialize the sinc filters.
len(freq_lims_hz) - 1filters are created. Mutually exclusive with n_filters_conv.n_filters_conv (int or None) – Number of filters to initialize with log-spaced cutoffs. Mutually exclusive with freq_lims_hz.
conv_kernel_len (int) – Kernel length (in samples) of each sinc convolution filter.
conv_stride (int) – Stride of the sinc convolution.
conv_padding ({"valid", "same"}) – Padding mode for the sinc convolution.
pool_kernel_len (int) – Kernel length for average-pooling after the filterbank.
flat_out ({"channels", "channels_and_time"} or None) – How to flatten the filterbank output before the classifier.
"channels"merges filters and channels →(B, F*C, T)."channels_and_time"flattens everything →(B, F*C*T).n_outputs (int or None) – If set, append a linear output layer with this many units.