Stan  2.10.0
probability, sampling & optimization
softabs_point.hpp
Go to the documentation of this file.
1 #ifndef STAN_MCMC_HMC_HAMILTONIANS_SOFTABS_POINT_HPP
2 #define STAN_MCMC_HMC_HAMILTONIANS_SOFTABS_POINT_HPP
3 
6 
7 namespace stan {
8  namespace mcmc {
13  class softabs_point: public ps_point {
14  public:
15  explicit softabs_point(int n):
16  ps_point(n),
17  alpha(1.0),
18  hessian(Eigen::MatrixXd::Identity(n, n)),
19  eigen_deco(n),
20  log_det_metric(0),
21  softabs_lambda(Eigen::VectorXd::Zero(n)),
22  softabs_lambda_inv(Eigen::VectorXd::Zero(n)),
23  pseudo_j(Eigen::MatrixXd::Identity(n, n)) {}
24 
25  // SoftAbs regularization parameter
26  double alpha;
27 
28  Eigen::MatrixXd hessian;
29 
30  // Eigendecomposition of the Hessian
31  Eigen::SelfAdjointEigenSolver<Eigen::MatrixXd> eigen_deco;
32 
33  // Log determinant of metric
35 
36  // SoftAbs transformed eigenvalues of Hessian
37  Eigen::VectorXd softabs_lambda;
38  Eigen::VectorXd softabs_lambda_inv;
39 
40  // Psuedo-Jacobian of the eigenvalues
41  Eigen::MatrixXd pseudo_j;
42 
43  virtual void
45  writer("No free parameters for SoftAbs metric");
46  }
47  };
48 
49  } // mcmc
50 } // stan
51 
52 #endif
virtual void write_metric(stan::interface_callbacks::writer::base_writer &writer)
Writes the metric.
Probability, optimization and sampling library.
Point in a generic phase space.
Definition: ps_point.hpp:17
Eigen::VectorXd softabs_lambda_inv
Eigen::VectorXd softabs_lambda
Eigen::SelfAdjointEigenSolver< Eigen::MatrixXd > eigen_deco
Point in a phase space with a base Riemannian manifold with SoftAbs metric.
base_writer is an abstract base class defining the interface for Stan writer callbacks.
Definition: base_writer.hpp:20

     [ Stan Home Page ] © 2011–2016, Stan Development Team.