I am trying to use HMC to do MCMC sampling with a self-defined target function. I had my HMC code, but it doesn't work well. So I want to implement my code with "stan".
I have already coded the target function as well as the derivative function in C. It involves for-loop, and functions needed for Cholesky decomposition and other linear algebras from Lapack. So complicated that I don't want to recode it in "stan". Is there any way to use my functions directly?
I browsed the user's guide but didn't see any code for defining a user-defined derivative. Can users define their own derivative?
I would also appreciate it if anyone can tell me where is the code for HMC updating in the source code. Maybe I can combine my code with C++ code.
Thank you!
--
You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
To post to this group, send email to stan-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+unsubscribe@googlegroups.com.
> To post to this group, send email to stan-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/ZDiVgFMZ7KU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/ZDiVgFMZ7KU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+unsubscribe@googlegroups.com.