Automatic Differentiation
 
Loading...
Searching...
No Matches
stan::math::internal::CholeskyWSolverBlock Struct Reference

Detailed Description

Solver Policy 1 (Block): Cholesky decomposition using block W.

This solver is used when hessian_block_size > 1. It computes the block-diagonal negative Hessian of the log-likelihood, computes its principal square root via block_matrix_sqrt, and forms the system matrix B = I + W_r * Sigma * W_r for Cholesky factorization.

The sparse structure of W_r is initialized in the constructor to match the problem dimensions.

Note
This solver corresponds to solver == 1 with hessian_block_size > 1.

Definition at line 582 of file laplace_marginal_density_estimator.hpp.

#include <laplace_marginal_density_estimator.hpp>

Public Member Functions

template<typename NewtonStateT >
 CholeskyWSolverBlock (const NewtonStateT &state, int hessian_block_size)
 
template<typename NewtonStateT , typename LLFun , typename LLTupleArgs , typename CovarMat >
void solve_step (NewtonStateT &state, const LLFun &ll_fun, const LLTupleArgs &ll_args, const CovarMat &covariance, int hessian_block_size, std::ostream *msgs)
 Perform one Newton step using block-diagonal Hessian solver.
 
double compute_log_determinant () const
 Compute log determinant of B from Cholesky factor.
 
template<typename NewtonStateT >
auto build_result (NewtonStateT &state, double log_det)
 Build the final result structure.
 

Public Attributes

Eigen::SparseMatrix< double > W_r
 Sparse square root of block Hessian.
 
Eigen::SparseMatrix< double > W_block
 Sparse block-diagonal Hessian from likelihood.
 
Eigen::LLT< Eigen::MatrixXd > llt_B
 Cholesky factorization of B = I + W_r * Sigma * W_r.
 

The documentation for this struct was generated from the following file: