hopsy.Gaussian#
- class hopsy.Gaussian(self, mean=[0, 0], covariance=[[1, 0], [0, 1]], inactives=[])#
Gaussian model which can be invariant in some dimensions of the input vector. As an example, consider the one-dimensional squared exponential as a function of two input variables
\[f(x_1, x_2) = \exp\big\{ -x_1^2 \big\}\]then this function is invariant under the second dimension. We also say, that the second component of the input vector \((x_1, x_2)\) is inactive. The degenerate multivariate Gaussian is defined as a regular Gaussian in \(n-k\) dimensions, where the input vector has \(n\) dimensions but \(k\) of its components are inactive.
Technically, this is realized by removing the rows and columns from the mean vector and covariance matrix, that correspond to the inactive dimensions. This then basically constructs a Gaussian in \(n-k\) dimensions. However, unlike a standard multivariate Gaussian model, this model will still (and only) accept input vectors of dimension \(n\).
Passing an empty list as
inactiveswill define a common multivariate Gaussian.- Parameters:
mean (numpy.ndarray[n, 1]) – Gaussian mean vector
covariance (numpy.ndarray[n, n]) – Gaussian covariance matrix
inactives (list[int]) – List of inactive dimensions, so entries should be between 0 and \(n-1\).
Attributes
covarianceThe Gaussian's covariance matrix in full space, thus having \(n^2\) entries.
inactivesList of indices of the inactive dimensions.
meanThe Gaussian's mean vector in full space, having \(n\) entries.
Methods
compute_expected_fisher_information(self, x)deprecated:: 1.4
compute_log_likelihood_gradient(self, x)deprecated:: 1.4
compute_negative_log_likelihood(self, x)deprecated:: 1.4
log_curvature(self x)Computes the expected fisher information of a multivariate Gaussian model in \(n-k\) dimensions at
x.log_density(self, x)Computes the probability density function of a multivariate Gaussian model in \(m-k\) dimensions at
x.log_gradient(self, x)Computes the gradient of the logarithm of the probability density function of a multivariate Gaussian model in \(n-k\) dimensions at
x.