gpflow.logdensities

gpflow.logdensities.bernoulli

gpflow.logdensities.bernoulli(x, p)[source]
Parameters
  • x (Union[ndarray, Tensor, Variable, Parameter]) –

  • p (Union[ndarray, Tensor, Variable, Parameter]) –

Return type

Tensor

gpflow.logdensities.beta

gpflow.logdensities.beta(x, alpha, beta)[source]
Parameters
  • x (Union[ndarray, Tensor, Variable, Parameter]) –

  • alpha (Union[ndarray, Tensor, Variable, Parameter]) –

  • beta (Union[ndarray, Tensor, Variable, Parameter]) –

Return type

Tensor

gpflow.logdensities.exponential

gpflow.logdensities.exponential(x, scale)[source]
Parameters
  • x (Union[ndarray, Tensor, Variable, Parameter]) –

  • scale (Union[ndarray, Tensor, Variable, Parameter]) –

Return type

Tensor

gpflow.logdensities.gamma

gpflow.logdensities.gamma(x, shape, scale)[source]
Parameters
  • x (Union[ndarray, Tensor, Variable, Parameter]) –

  • shape (Union[ndarray, Tensor, Variable, Parameter]) –

  • scale (Union[ndarray, Tensor, Variable, Parameter]) –

Return type

Tensor

gpflow.logdensities.gaussian

gpflow.logdensities.gaussian(x, mu, var)[source]
Parameters
  • x (Union[ndarray, Tensor, Variable, Parameter]) –

  • mu (Union[ndarray, Tensor, Variable, Parameter]) –

  • var (Union[ndarray, Tensor, Variable, Parameter]) –

Return type

Tensor

gpflow.logdensities.laplace

gpflow.logdensities.laplace(x, mu, sigma)[source]
Parameters
  • x (Union[ndarray, Tensor, Variable, Parameter]) –

  • mu (Union[ndarray, Tensor, Variable, Parameter]) –

  • sigma (Union[ndarray, Tensor, Variable, Parameter]) –

Return type

Tensor

gpflow.logdensities.lognormal

gpflow.logdensities.lognormal(x, mu, var)[source]
Parameters
  • x (Union[ndarray, Tensor, Variable, Parameter]) –

  • mu (Union[ndarray, Tensor, Variable, Parameter]) –

  • var (Union[ndarray, Tensor, Variable, Parameter]) –

Return type

Tensor

gpflow.logdensities.multivariate_normal

gpflow.logdensities.multivariate_normal(x, mu, L)[source]

Computes the log-density of a multivariate normal. :param x : Dx1 or DxN sample(s) for which we want the density :param mu : Dx1 or DxN mean(s) of the normal distribution :param L : DxD Cholesky decomposition of the covariance matrix :return p : (1,) or (N,) vector of log densities for each of the N x’s and/or mu’s

x and mu are either vectors or matrices. If both are vectors (N,1): p[0] = log pdf(x) where x ~ N(mu, LL^T) If at least one is a matrix, we assume independence over the columns: the number of rows must match the size of L. Broadcasting behaviour: p[n] = log pdf of: x[n] ~ N(mu, LL^T) or x ~ N(mu[n], LL^T) or x[n] ~ N(mu[n], LL^T)

Parameters
  • x (Union[ndarray, Tensor, Variable, Parameter]) –

  • mu (Union[ndarray, Tensor, Variable, Parameter]) –

  • L (Union[ndarray, Tensor, Variable, Parameter]) –

Return type

Tensor

gpflow.logdensities.poisson

gpflow.logdensities.poisson(x, lam)[source]
Parameters
  • x (Union[ndarray, Tensor, Variable, Parameter]) –

  • lam (Union[ndarray, Tensor, Variable, Parameter]) –

Return type

Tensor

gpflow.logdensities.student_t

gpflow.logdensities.student_t(x, mean, scale, df)[source]
Parameters
  • x (Union[ndarray, Tensor, Variable, Parameter]) –

  • mean (Union[ndarray, Tensor, Variable, Parameter]) –

  • scale (Union[ndarray, Tensor, Variable, Parameter]) –

  • df (Union[ndarray, Tensor, Variable, Parameter]) –

Return type

Tensor