1#ifndef STAN_MATH_MIX_PROB_LAPLACE_MARGINAL_HPP
2#define STAN_MATH_MIX_PROB_LAPLACE_MARGINAL_HPP
28template <
bool propto =
false,
typename LFun,
typename LArgs,
typename CovarFun,
29 typename ThetaVec,
typename CovarArgs,
30 require_all_eigen_vector_t<ThetaVec>* =
nullptr>
32 LFun&& L_f, LArgs&& l_args, CovarFun&& covariance_function,
33 CovarArgs&& covar_args,
const ThetaVec& theta_0,
double tolerance,
34 int max_num_steps,
const int hessian_block_size,
const int solver,
35 const int max_steps_line_search, std::ostream* msgs) {
37 max_steps_line_search, tolerance,
40 std::forward<LFun>(L_f), std::forward<LArgs>(l_args),
41 std::forward<CovarFun>(covariance_function),
42 std::forward<CovarArgs>(covar_args), ops, msgs);
62template <
bool propto =
false,
typename LFun,
typename LArgs,
typename CovarFun,
65 CovarFun&& covariance_function,
66 CovarArgs&& covar_args, std::ostream* msgs) {
68 std::forward<LFun>(L_f), std::forward<LArgs>(l_args),
69 std::forward<CovarFun>(covariance_function),
Reference for calculations of marginal and its gradients: Margossian et al (2020),...
T value_of(const fvar< T > &v)
Return the value of the specified variable.
auto laplace_marginal_tol(LFun &&L_f, LArgs &&l_args, CovarFun &&covariance_function, CovarArgs &&covar_args, const ThetaVec &theta_0, double tolerance, int max_num_steps, const int hessian_block_size, const int solver, const int max_steps_line_search, std::ostream *msgs)
Wrapper function around the laplace_marginal_density function.
auto laplace_marginal(LFun &&L_f, LArgs &&l_args, CovarFun &&covariance_function, CovarArgs &&covar_args, std::ostream *msgs)
Wrapper function around the laplace_marginal function.
double laplace_marginal_density(LLFun &&ll_fun, LLTupleArgs &&ll_args, CovarFun &&covariance_function, CovarArgs &&covar_args, const laplace_options< InitTheta > &options, std::ostream *msgs)
For a latent Gaussian model with global parameters phi, latent variables theta, and observations y,...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...