![]() |
Stan
1.0
probability, sampling & optimization
|
The abstract base class for models generated by the Stan compiler stanc.
More...
#include <stanc_model.hpp>
Additional Inherited Members | |
Public Member Functions inherited from stan::model::prob_grad_ad | |
| prob_grad_ad (size_t num_params_r) | |
| prob_grad_ad (size_t num_params_r, std::vector< std::pair< int, int > > ¶m_ranges_i) | |
| virtual | ~prob_grad_ad () |
| virtual agrad::var | log_prob (std::vector< agrad::var > ¶ms_r, std::vector< int > ¶ms_i, std::ostream *output_stream=0)=0 |
| virtual double | grad_log_prob (std::vector< double > ¶ms_r, std::vector< int > ¶ms_i, std::vector< double > &gradient, std::ostream *output_stream=0) |
| virtual double | log_prob (std::vector< double > ¶ms_r, std::vector< int > ¶ms_i, std::ostream *output_stream=0) |
Public Member Functions inherited from stan::model::prob_grad | |
| prob_grad (size_t num_params_r) | |
| prob_grad (size_t num_params_r, std::vector< std::pair< int, int > > ¶m_ranges_i) | |
| virtual | ~prob_grad () |
| void | set_num_params_r (size_t num_params_r) |
| void | setparam_ranges_i__ (std::vector< std::pair< int, int > > param_ranges_i) |
| virtual size_t | num_params_r () |
| virtual size_t | num_params_i () |
| std::pair< int, int > | param_range_i (size_t idx) |
| void | set_param_range_i_lower (size_t idx, int low) |
| void | set_param_range_i_upper (size_t idx, int up) |
| int | param_range_i_lower (size_t idx) |
| int | param_range_i_upper (size_t idx) |
| virtual void | init (std::vector< double > ¶ms_r, std::vector< int > ¶ms_i) |
| virtual double | grad_hess_log_prob (std::vector< double > ¶ms_r, std::vector< int > ¶ms_i, std::vector< double > &gradient, std::vector< double > &hessian, std::ostream *output_stream=0) |
| Evaluate the log-probability, its gradient, and its Hessian at params_r. More... | |
| virtual double | log_prob_star (size_t idx, int val, std::vector< double > ¶ms_r, std::vector< int > ¶ms_i, std::ostream *output_stream=0) |
| virtual void | write_csv (std::vector< double > ¶ms_r, std::vector< int > ¶ms_i, std::ostream &o, std::ostream *output_stream=0) |
| Write the parameters on a single line in CSV format. More... | |
| void | finite_diff_grad (std::vector< double > ¶ms_r, std::vector< int > ¶ms_i, std::vector< double > &grad, double epsilon=1e-6, std::ostream *output_stream=0) |
| Compute the gradient using finite differences for the specified parameters, writing the result into the specified gradient, using the specified perturbation. More... | |
| int | test_gradients (std::vector< double > ¶ms_r, std::vector< int > ¶ms_i, double epsilon=1e-6, double error=1e-6, std::ostream &o=std::cout, std::ostream *output_stream=0) |
| Test the grad_log_prob() function's ability to produce accurate gradients using finite differences. More... | |
Protected Attributes inherited from stan::model::prob_grad | |
| size_t | num_params_r__ |
| std::vector< std::pair< int, int > > | param_ranges_i__ |
The abstract base class for models generated by the Stan compiler stanc.
Definition at line 14 of file stanc_model.hpp.