Skip to content

[WIP] Implementation of Inverse Wishart distribution#70275

Closed
nonconvexopt wants to merge 352 commits intopytorch:masterfrom
nonconvexopt:inverse_wishart_distribution
Closed

[WIP] Implementation of Inverse Wishart distribution#70275
nonconvexopt wants to merge 352 commits intopytorch:masterfrom
nonconvexopt:inverse_wishart_distribution

Conversation

@nonconvexopt
Copy link
Copy Markdown
Contributor

@nonconvexopt nonconvexopt commented Dec 21, 2021

On the process of #68050
Contiguous to previous contribution #68588 implemented torch.distributions.wishart.Wishart with @neerajprad.
cc @neerajprad

While working on #68588, @dccastro provided initiative implementation of Inverse Wishart distribution based on PyTorch: https://github.com/biomedia-mira/deepscm/blob/master/deepscm/distributions/torch_wishart.py
Thank you for the neat and intuitive work to reference.

TODO:

  • Implement all functions
  • Unit Test
  • Documentation

Note) Removed 'Add transform from Wishart distribution to Inverse Wishart distribution' from TODO since we added manual implementation for Inverse Wishart distribution.

nonconvexopt and others added 30 commits December 6, 2021 23:33
nonconvexopt and others added 7 commits March 31, 2022 14:22
Summary:
Pull Request resolved: pytorch#76357

Fix for pytorch#76160

This fixes the random seed for the `test_wishart_log_prob` (like all random tests in `test_distributions`) to prevent non-determinism.

Test Plan: Tested locally.

Differential Revision: D35914795

fbshipit-source-id: 85001cc500e1d48d4e81c2e33b783ed6c38c9851
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 1, 2022

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions Bot added the Stale label Aug 1, 2022
@github-actions github-actions Bot closed this Sep 14, 2022
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 25, 2026
…orch#71375)

Summary:
While implementing pytorch#70275, I thought that it will be useful if there is a `torch.distributions.constraints` to check the positive-semidefiniteness of matrix random variables.
This PR implements it with `torch.linalg.eigvalsh`, different from `torch.distributions.constraints.positive_definite` implemented with `torch.linalg.cholesky_ex`.
Currently, `torch.linalg.cholesky_ex` returns only the order of the leading minor that is not positive-definite in symmetric matrices and we can't check positive semi-definiteness by the mechanism.
cc neerajprad

Pull Request resolved: pytorch#71375

Reviewed By: H-Huang

Differential Revision: D33663990

Pulled By: neerajprad

fbshipit-source-id: 02cefbb595a1da5e54a239d4f17b33c619416518
(cherry picked from commit 43eaea5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed open source Stale triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants