Skip to content

update signature for laplace bernoulli logit functions. - #3355

Open
charlesm93 wants to merge 1 commit into
developfrom
fix/3353-laplace_bernouilli_logit
Open

update signature for laplace bernoulli logit functions.#3355
charlesm93 wants to merge 1 commit into
developfrom
fix/3353-laplace_bernouilli_logit

Conversation

@charlesm93

Copy link
Copy Markdown
Member

Summary

Fixes #3353

Replaces the signatures for laplace_marginal_bernoulli_logit_lpmf and laplace_latent_bernoulli_logit_rng so that the user passes in a vector of observations and a vector of indices, indicating to which group each observation belongs to. This is consistent with what is the documentation and what was done for other laplace functions with a built-in likelihood.

Tests

Updates made to laplace_marginal_bernoulli_logit_lpmf_test.cpp and laplace_bernoulli_logit_rng_test.cpp so that the new signature gets tested.

Side Effects

The old signature expected users to pass in sufficient statistics, which led to some efficiency gain. However, the new code, while slower, has a more user-friendly interface.

Release notes

  • Fix signatures for laplace functions with built-in bernoulli_logit likelihood.

Checklist

  • Copyright holder: Charles Margossian and University of British Columbia

    The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
    - Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
    - Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

  • the basic tests are passing (ToDO: run all those...)

    • unit tests pass (to run, use: ./runTests.py test/unit)
    • header checks pass, (make test-headers)
    • dependencies checks pass, (make test-math-dependencies)
    • docs build, (make doxygen)
    • code passes the built in C++ standards checks (make cpplint)
  • the code is written in idiomatic C++ and changes are documented in the doxygen

  • the new changes are tested

@charlesm93
charlesm93 requested a review from SteveBronder August 4, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

laplace_marginal: inconsistency between doc and math for built-in bernoulli_logit likelihood

1 participant