![]() |
Stan Math Library
5.1.0
Automatic Differentiation
|
|
inline |
Wrapper function around the laplace_marginal function.
Returns the marginal density p(y | phi) by marginalizing out the latent gaussian variable, with a Laplace approximation. See the laplace_marginal function for more details. The data y is assumed to be real. The function is "overloaded" below for the int y and lpmf case.
propto | If FALSE, log density is computed up to an additive const. |
LFun | The function which returns the log likelihood. |
LArgs | A tuple of arguments to the log likelihood. |
ThetaVec | A type inheriting from Eigen::EigenBase with dynamic sized rows and 1 column. |
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() |
[in] | L_f | a function which returns the log likelihood. |
[in] | l_args | A tuple of arguments to pass to the log likelihood |
[in] | theta_0 | the initial guess for the Laplace approximation. |
[in] | covariance_function | a function which returns the prior covariance. |
[in] | covar_args | arguments for the covariance function. |
[in,out] | msgs | stream for messages from likelihood and covariance |
Definition at line 64 of file laplace_marginal.hpp.