Skip to content

Add dirichlet distribution #1999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

reubenharry
Copy link

Implements issue #1998.

Copy link

google-cla bot commented Apr 22, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@reubenharry
Copy link
Author

I've marked this as a draft because there are currently no tests, but suggestions are welcome.

@reubenharry reubenharry marked this pull request as ready for review April 23, 2025 18:33
Copy link
Member

@SiegeLordEx SiegeLordEx left a comment

Choose a reason for hiding this comment

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

Thanks! It looks mostly good (I added comments); there's many formatting issues, but I'll take care of them on our end when we import change.

@reubenharry
Copy link
Author

Thanks for the comments - I think all addressed!

A few points:

  • I didn't add a test running HMC on the distribution (although I have done that using my own code), mainly because I'm not very familiar with the tensorflow probability sampling code, and I struggled to debug it.
  • I'd like to add a sample transformation for lambda x: x*2, but haven't yet found the closed form fourth moment of the Dirichlet (although I presume it exists).
  • I'm happy to run autoformatting stuff for future PRs of this nature, but wasn't sure what tools you used

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.

2 participants