stan c++ library

161 views
Skip to first unread message

Su

unread,
Nov 5, 2013, 10:33:21 AM11/5/13
to stan-...@googlegroups.com
Hi, I vaguely remember there was documentation for stan c++ library including some c++ class used in stan like NUTS sampler. But why I couldn't find any  information about this c++ library as well as the documentation online any more?

                                                        Su

Ben Goodrich

unread,
Nov 5, 2013, 11:23:11 AM11/5/13
to stan-...@googlegroups.com
It is not fully documented or super-stable. But if you clone the source from github and open

$STAN_HOME/doc/api/html/index.html


in a web browser, you can see the doxygen version of the documentation.

Ben

Su

unread,
Nov 5, 2013, 12:06:49 PM11/5/13
to stan-...@googlegroups.com
Thanks so much!!!

Bob Carpenter

unread,
Nov 5, 2013, 12:34:57 PM11/5/13
to stan-...@googlegroups.com


On 11/5/13, 12:06 PM, Su wrote:
> Thanks so much!!!
>
> On Tuesday, November 5, 2013 10:23:11 AM UTC-6, Ben Goodrich wrote:
>
> It is not fully documented or super-stable.

Just to qualify that --- the instability Ben's talking about is in
terms of the API specifications. The code is pretty solidly
tested, though we could always use more help in that department.

There's some more tips for C++ developers on our Wiki.

- Bob

Su

unread,
May 11, 2014, 3:17:29 AM5/11/14
to stan-...@googlegroups.com
Hi Bob, thank you for your response so much!
 I want to define the log density and gradient in C++ and call the NUT or HMC sampler in C++. Will you please show me some simple example?
Thanks.    

Bob Carpenter

unread,
May 11, 2014, 4:30:21 PM5/11/14
to stan-...@googlegroups.com
I'm afraid there aren't any simple examples we can point you to.

The best thing to do is run stanc and look at the generated
model code. It exposes functions that expose the log density
and gradient on the unconstrained scale (with and without Jacobian).

As to HMC and NUTS, you'll have to then trace through the
compiled command code. That used to be in stan/gm/command.hpp,
but it's moving to its own repo in CmdStan.

- Bob
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages