stan-dev / cmdstan

CmdStan, the command line interface to Stan
https://mc-stan.org/users/interfaces/cmdstan
BSD 3-Clause "New" or "Revised" License
210 stars 93 forks source link

Implement calculate_lp, diagnostic args for laplace #1246

Closed WardBrian closed 7 months ago

WardBrian commented 7 months ago

Submisison Checklist

Summary:

Exposes new arguments for laplace from https://github.com/stan-dev/stan/pull/3261.

calculate_lp is a boolean subarg of laplace which controls whether or not log_prob is called for each approximate draw. Default is true (existing behavior).

For the hessian and other information, I re-used the diagnostic_file argument of output. This matches with e.g. the JSON outputs of Pathfinder, but if we want a dedicated argument I can add one.

Intended Effect:

Expose new arguments to the laplace sample algorithm

How to Verify:

These are tested in the Stan implementation. I can add more here if desired.

Side Effects:

Documentation:

TBD

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):

Simons Foundation

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

WardBrian commented 7 months ago

Just to check: @avehtari - does this sound like it does everything you wanted?

avehtari commented 7 months ago

Sounds good