Skip to content

Conversation

@WardBrian
Copy link
Member

Submission Checklist

  • Run unit tests: ./runTests.py src/test/unit
  • Run cpplint: make cpplint
  • Declare copyright holder and open-source license: see below

Summary

Closes #3215
Closes #3260

Intended Effect

This adds two new options to the laplace approximation service function. The first is a boolean calculate_lp, similar to #3249

The second is a structured writer which will save the result of the evaluation at the mode, namely it will produce a JSON file like

{
  "lp_mode" : 0,
  "gradient" : [ 0, 0 ],
  "Hessian" : [ [ -2.77778, 2.22222 ], [ 2.22222, -2.77778 ] ]
}

How to Verify

Tests added

Side Effects

I left the existing function for backwards compatibility. The above arguments default to true and a no-op writer, respectively.

Documentation

Added inline documentation, online doc will come with the cmdstan PR.

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:

Copy link
Collaborator

@SteveBronder SteveBronder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

@WardBrian WardBrian merged commit a49908b into develop Jan 30, 2024
@WardBrian WardBrian deleted the feature/3215-3260-laplace-additions branch January 30, 2024 20:52
@avehtari
Copy link
Member

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

5 participants