leaspy.variables.utilities

Functions

compute_individual_parameter_std_from_sufficient_statistics(...)

Maximization rule, from the sufficient statistics, of the standard-deviation of Gaussian prior for individual latent variables.

Module Contents

compute_individual_parameter_std_from_sufficient_statistics(state, individual_parameter_values, individual_parameter_sqr_values, *, individual_parameter_name, dim, **kws)[source]

Maximization rule, from the sufficient statistics, of the standard-deviation of Gaussian prior for individual latent variables.

Parameters:
statedict`[:obj:`str, torch.Tensor]

The current state object that holds all the variables

individual_parameter_valuestorch.Tensor

Tensor containing individual parameter values, used to compute current means.

individual_parameter_sqr_valuestorch.Tensor

Tensor containing squared individual parameter values, used to compute variances.

individual_parameter_namestr

The name of the individual parameter for which to compute the std.

dimint

The dimension along which to compute the mean and variance

Returns:
torch.Tensor

The updated standard deviation of the Gaussian prior for the individual parameter

Parameters: