cagpjax.distributions
Classes:
-
GaussianDistribution–Gaussian distribution with an implicit covariance and customizable linear solver.
GaussianDistribution
GaussianDistribution(loc: Float[Array, ' N'], scale: LinearOperator, solver: AbstractLinearSolver = Cholesky(1e-06), **kwargs)
Bases: Distribution
Gaussian distribution with an implicit covariance and customizable linear solver.
Initialize the Gaussian distribution.
Parameters:
-
(locFloat[Array, ' N']) –Mean of the distribution.
-
(scaleLinearOperator) –Scale of the distribution.
-
(solverAbstractLinearSolver, default:Cholesky(1e-06)) –Method for solving the linear system of equations.
Methods:
-
covariance–Operator representing the covariance of the distribution.
-
log_prob–Compute the log probability of the distribution at the given value.
-
sample–Sample from the distribution.
Attributes:
-
mean(Float[Array, ' N']) –Mean of the distribution.
-
stddev(Float[Array, ' N']) –Marginal standard deviation of the distribution.
-
variance(Float[Array, ' N']) –Marginal variance of the distribution.
Source code in src/cagpjax/distributions.py
covariance
log_prob
Compute the log probability of the distribution at the given value.
Parameters:
-
(valueFloat[Array, ' N']) –Value at which to compute the log probability.
Returns:
-
ScalarFloat–Log probability of the distribution at the given value.
Source code in src/cagpjax/distributions.py
sample
Sample from the distribution.
Parameters:
-
(keyKey) –Random key for sampling.
-
(sample_shapetuple[int, ...], default:()) –Shape of the sample.
Returns:
-
Float[Array, '*sample_shape N']–Sample from the distribution.