NonnegativeGMRF#

class cuqi.implicitprior.NonnegativeGMRF(mean=None, prec=None, bc_type='zero', order=1, **kwargs)#

Implicit Nonnegative GMRF (Gaussian Markov Random Field).

Defines a so-called implicit prior based on a GMRF distribution with implicit nonnegativity constraints.

Can be used as a prior in a posterior which can be sampled with the RegularizedLinearRTO sampler.

Alias for RegularizedGMRF with only nonnegativity constraints.

For more details on implicit regularized Gaussian see the following paper:

[1] Everink, Jasper M., Yiqiu Dong, and Martin S. Andersen. “Sparse Bayesian inference with regularized Gaussian distributions.” Inverse Problems 39.11 (2023): 115004.

Parameters:
  • mean – See GMRF for details.

  • prec – See GMRF for details.

  • bc_type – See GMRF for details.

  • order – See GMRF for details.

__init__(mean=None, prec=None, bc_type='zero', order=1, **kwargs)#

Initialize the core properties of the distribution.

Parameters:
  • name (str, default None) – Name of distribution.

  • geometry (Geometry, default _DefaultGeometry (or None)) – Geometry of distribution.

  • is_symmetric (bool, default None) – Indicator if distribution is symmetric.

Methods

__init__([mean, prec, bc_type, order])

Initialize the core properties of the distribution.

constraint_options()

disable_FD()

Disable finite difference approximation for logd gradient.

enable_FD([epsilon])

Enable finite difference approximation for logd gradient.

get_conditioning_variables()

Return the conditioning variables of this distribution (if any).

get_mutable_variables()

Return any public variable that is mutable (attribute or property) except those in the ignore_vars list

get_parameter_names()

Returns the names of the parameters that the density can be evaluated at or conditioned on.

gradient(*args, **kwargs)

Returns the gradient of the log density at x.

logd(*args, **kwargs)

Evaluate the un-normalized log density function of the distribution.

logpdf(x)

Evaluate the log probability density function of the distribution.

pdf(x)

Evaluate the log probability density function of the distribution.

regularization_options()

sample([N])

Sample from the distribution.

to_likelihood(data)

Convert conditional distribution to a likelihood function given observed data

Attributes

FD_enabled

Returns True if finite difference approximation of the logd gradient is enabled.

FD_epsilon

Spacing for the finite difference approximation of the logd gradient.

cov

dim

Return the dimension of the distribution based on the geometry.

gaussian

geometry

Return the geometry of the distribution.

is_cond

Returns True if instance (self) is a conditional distribution.

mean

name

Name of the random variable associated with the density.

prec

preset

proximal

sqrtcov

sqrtprec