neuraltrain.models.freqbandnet.FreqBandNet

pydantic model neuraltrain.models.freqbandnet.FreqBandNet[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) - 1 filters 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.

Fields:
field sfreq: float | None = None[source]
field freq_lims_hz: list[float] | None = [0.1, 0.5, 4.0, 8.0, 12.0, 30.0, 60.0][source]
field n_filters_conv: int | None = None[source]
field conv_kernel_len: int = 65[source]
field conv_stride: int = 1[source]
field conv_padding: Literal['valid', 'same'] = 'valid'[source]
field pool_kernel_len: int = 30[source]
field flat_out: Literal['channels', 'channels_and_time'] | None = None[source]
field n_outputs: int | None = None[source]
build(n_in_channels: int | None = None, n_outputs: int | None = None, sfreq: float | None = None) Module[source][source]