rbnet.multivariate_normal.Product

class rbnet.multivariate_normal.Product(means, covariances=None, precisions=None, determinants=None, scaled_means=None, method=None)[source]

Bases: object

Represents the product of N multivariate normal distributions over the same random variable. The inputs may additionally have an arbitrary number of batch dimensions (indicated as ‘…’ below). The means and either the covariances or precisions have to be provided, the remaining parameters are computed from them (providing them will avoid recomputation). The ‘method’ argument determines which method is used for computing the normalisation factor. Methods return a triplet (log scaling factor (…), mean (…xD), covariance matrix (…xDxD) of the product), which are also available as log_norm, mean, covariance properties, respectively.

Parameters:
  • means (Tensor) – Nx…xD array of means

  • covariances (Optional[Tensor]) – Nx…xDxD array of covariance matrices

  • precisions (Optional[Tensor]) – Nx…xDxD array of precision matrices

  • determinants (Optional[Tensor]) – Nx… array with determinants of the covariance matrices

  • scaled_means (Optional[Tensor]) – Nx…xD array with products of precision matrices and means

  • method (Optional[str]) – method to use for computing the scaling factor (None/’default’, ‘iter’, ‘pair’, ‘commute’)

Public Methods:

__init__(means[, covariances, precisions, ...])

Represents the product of N multivariate normal distributions over the same random variable.

product()

iter_product(means, covariances)

commuting_product()


commuting_product()[source]
classmethod iter_product(means, covariances)[source]
product()[source]