Bob Carpenter
unread,Feb 5, 2013, 5:18:10 PM2/5/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to stan...@googlegroups.com
On 2/5/13 3:54 PM, Michael Betancourt wrote:> Happy to chat anytime, but for future reference the methods I need are
>
> scaler V = - log_p
> matrix H = - d_{i} d_{j} log_p
> vector traceMH = -d_{r} ( Trace[ M_{ij} d_{j} d_{k} log_p ] )
> vector traceMHplusV = - d_{r} ( 0.5 * Trace[ M_{ij} d_{j} d_{k} log_p ] + log_p )
>
> -Betancourt
Peter:
After releasing Stan 1.1.1 today, I'm going to work
full time on the fvar branch to support what Michael
needs to implement Riemann Manifold HMC.
It's fantastic that you've gotten so far already.
Definitely far enough for us to start testing models
that we implement directly. Between the two of us,
we should be able to finish off the rest of the functions
we need.
How about I provide the following, where theta is
the current set of parameters and log p(theta) is
the log probability up to a proportion.
1. Potential (i.e., negative log probabilty)
scalar, V = - log(p(theta))
2. Gradient of Potential
vector, d_i V
3. Hessian of potential:
matrix, H = d_i d_j V
4. Gradient of matrix-Hessian product:
vector, d_i -Tr[M H]
5. Gradient of half matrix-Hessian plus potential,
which for a fixed double matrix M, gives
vector, d_i (V - Tr[M H])
It's easy enough to build 5 out of 4 and 2, so I might
do it that way. The work done for the graident of the potential
is dwarfed by the gradient of the matrix-Hessian product.
I propose that we define two additional classes
in stan/model:
prob_hessian : public prob_grad
--- allow user-definitions of above
prob_hessian_ad : public prob_grad_ad
--- compute above with auto-dif
Alternatively, I could just replace the prob_grad
and prob_grad_ad classes.
- Bob