Skip to content

Dev dirchlet linear - #1516

Open
msupernaw wants to merge 30 commits into
mainfrom
dev-dirchlet-linear
Open

Dev dirchlet linear#1516
msupernaw wants to merge 30 commits into
mainfrom
dev-dirchlet-linear

Conversation

@msupernaw

@msupernaw msupernaw commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

What is the feature?

  • Makes the Dirichlet linear multinomial available for the power user. Wrapper functions currently can't accommodate anything other than multinomial.

How have you implemented the solution?

  • Implemented the Dirichlet linear multinomial in the backend code.

Does the PR impact any other area of the project, maybe another repo?

  • no

Instructions for code reviewer

👋Hello reviewer👋, thank you for taking the time to review this PR!

  • Please use this checklist during your review, checking off items that you have verified are complete but feel free to skip over items that are not relevant!
  • See the GitHub documentation for how to comment on a PR to indicate where you have questions or changes are needed before approving the PR.
  • Please use standard conventional messages for both commit messages and comments
  • PR reviews are a great way to learn so feel free to share your tips and tricks. However, when suggesting changes to the PR that are optional please include nit: (for nitpicking) as the comment type. For example, nit: I prefer using a data.frame() instead of a matrix because ...
  • Engage with the developer. Make it clear when the PR is approved by selecting the approved status, and potentially commenting on the PR with something like This PR is now ready to be merged.

Checklist

  • The code is well-designed
  • The code is designed well for both users and developers
  • Code coverage remains high- [ ] Comments are clear, useful, and explain why instead of what
  • Code is appropriately documented (doxygen and roxygen)

JonBrodziak and others added 30 commits March 24, 2026 15:33
Removed comment about using the FIMS custom sum function.
Removed unnecessary include for fims_vector.hpp.
…test inputs for DM PMF read from csv created and verified with "Test_value_diric_multinom.R"
Use the global lgamma (::lgamma) in ddiric_multinom to avoid incorrect fims_math resolution, and update calls accordingly. Add fims_math include to the Dirichlet-multinomial functor and export the functor header from distributions.hpp. Fix Rcpp distribution interface bugs and naming/initialization issues: correct make_shared/copy-constructor types for the DDirichletMultinomial interface, initialize the underlying theta from initial_value_m, and update Rcpp bindings (method names, fields and expose theta). These changes address compilation/runtime errors and ensure the Dirichlet-multinomial distribution is properly registered and usable from R.
Export DDirichletMultinomDistribution in NAMESPACE to make the new distribution available to package users. Also add DDirichletMultinomialDistributionsInterface to inst/WORDLIST so the identifier is recognized by the package wordlist (avoids spellcheck/lint issues).
Added 'dirichlet_multinomial' to available distributions and created a new function for it.
Updated documentation @details to clarify the implementation of the Dirichlet-multinomial log-probability mass function.
…roposed fix to switch between composition distribution types in "fix_helper_setup_R1.docx". More general solution recommended for multiple composition types and other submodel components.
…ration-tests-validation.R to support Dirichlet-Multinomial distribution.
@kellijohnson-NOAA

Copy link
Copy Markdown
Contributor

This branch needs to be rebased to main. I have done it locally and can push for you if you want but I wasn't sure what was best for you given there are two of you working on this branch. With the rebase, I wiped out all changes to tests/gtest/CmakeLists.txt and then added the Dirchlet-mulitnomial test back in after near the fimsMath tests rather than at the end of the file. Second, why do you have the naming convention of ddiric_multinom rather than spelling it out in full? There are quite a few abbreviations like this that I think should be written out in full for comprehension purposes. Additionally, if the words are written out in full then the changes to the WORDLIST file will be slim to none. There was some code added to the R directory but it is not complete and should probably be removed.
Once these things are fixed, I will assign Andrea to review it.

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.

[FEATURE] Dirichlet-multinomial likelihood for composition data

3 participants