![]() |
Stan Math Library
5.1.0
Automatic Differentiation
|
|
inline |
In a latent gaussian model,.
theta ~ Normal(theta | 0, Sigma(phi, x)) y ~ pi(y | theta, eta)
returns a multivariate normal random variate sampled from the Laplace approximation of p(theta_pred | y, phi, x_pred). Note that while the data is observed at x (train_tuple), the new samples are drawn for covariates x_pred (pred_tuple). To sample the "original" theta's, set pred_tuple = train_tuple.
LLFunc | Type of likelihood function. |
LLArgs | Tuple of arguments types of likelihood function. |
CovarFun | A functor with an operator()(CovarArgsElements..., {TrainTupleElements...| PredTupleElements...}) method. The operator() method should accept as arguments the inner elements of CovarArgs . The return type of the operator() method should be a type inheriting from Eigen::EigenBase with dynamic sized rows and columns. |
CovarArgs | A tuple of types to passed as the first arguments of CovarFun::operator() |
RNG | A valid boost rng type |
ll_fun | Likelihood function. | |
ll_args | Arguments for likelihood function. | |
[in] | covariance_function | a function which returns the prior covariance. |
[in] | covar_args | arguments for the covariance function. |
options | Control parameter for optimizer underlying Laplace approx. | |
[in,out] | rng | Random number generator |
[in,out] | msgs | stream for messages from likelihood and covariance |
Definition at line 37 of file laplace_base_rng.hpp.