osl_dynamics.models.sc_dynemo#

Single-channel Dynamic Network Modes (SC-DyNeMo).

Classes#

Config

Additional parameters for SC-DyNeMo.

Model

Single-channel Dynamic Network Modes (SC-DyNeMo).

Module Contents#

class osl_dynamics.models.sc_dynemo.Config[source]#

Bases: osl_dynamics.models.dynemo.Config

Additional parameters for SC-DyNeMo.

Parameters:
  • sampling_frequency (float) – The sampling frequency of the data (Hz).

  • frequency_range (tuple[float, float]) – Limits for the frequency parameter. Upper limit should not be higher than the Nyquist frequency.

model_name: str = 'SC-DyNeMo'[source]#
sampling_frequency: float = None[source]#
frequency_range: list = None[source]#
class osl_dynamics.models.sc_dynemo.Model(config)[source]#

Bases: osl_dynamics.models.dynemo.Model

Single-channel Dynamic Network Modes (SC-DyNeMo).

This model is a single-channel version of DyNeMo. It should only be used for single-channel data which has been time-embedded.

This model parameterises the covariance matrice for each model assuming a stochastic oscillators.

The parameters are the amplitude (\(A\)), frequency (\(f\)), and variance of added Gaussian noise (\(\sigma^2\)) of oscillators. The parameters define the auto-covariance matrix as:

\[C_{ij} = \frac{1}{2} A^2 \cos(2 \pi f \Delta t) + \delta_{ij} \sigma^2\]
Parameters:

config (Config) – The model configuration.

config_type[source]#
build_model()[source]#

Builds a keras model.

Return type:

None

get_amplitude()[source]#

Get the amplitude of the oscillators.

Returns:

amplitude – The amplitude of the oscillators.

Return type:

np.ndarray

get_frequency()[source]#

Get the frequencies of the oscillators.

Returns:

frequency – The frequencies of the oscillators.

Return type:

np.ndarray

get_variance()[source]#

Get the variances of the oscillators.

Returns:

variance – The variance of the oscillators.

Return type:

np.ndarray

get_oscillator_parameters()[source]#

Get the parameters of the oscillators.

Returns:

oscillator_parameters – The parameters of the model. Keys are 'amplitude', 'frequency' and 'variance'.

Return type:

dict[str, np.ndarray]