osl_dynamics.inference.layers.MixtureMVNLayer#
- class osl_dynamics.inference.layers.MixtureMVNLayer(n_states, n_channels, *, learn_means, learn_covariances, initial_means=None, initial_covariances=None, covariances_epsilon=0.0, diagonal_covariances=False, means_regularizer=None, covariances_regularizer=None, covariances_layer=None, **kwargs)#
Bases:
MVNLayerMultivariate normal observation model whose mean and covariance at each time point are mixtures of a mean and covariance for each mode.
Takes the same parameters as
MVNLayer.- log_likelihood(x, alpha)#
Log-likelihood of each time point.
- Parameters:
- xtf.Tensor
Data. Shape is (batch_size, sequence_length, n_channels).
- alphatf.Tensor
Mixing coefficients. Shape is (batch_size, sequence_length, n_modes).
- Returns:
- log_likelihoodtf.Tensor
Shape is (batch_size, sequence_length).
- summary_rows()#
Rows for the layer in the summary of a model.
- Returns:
- rowslist of tuple
(name, details, learned by, number of learned values)for each row.
- regularization()#
Regularization of the means and covariances.
- Returns:
- regularizationtf.Tensor
Scalar.