Skip to content
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

Fix von Mises-Fisher sampler #1930

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix von Mises-Fisher sampler #1930

wants to merge 1 commit into from

Conversation

devmotion
Copy link
Member

Fixes #1423.

As already discussed in #1423, in the special case mu = [1, 0, ..., 0] no rotation of the "initial" sample is needed. I think skipping the rotation completely is preferable over a numerical workaround such as #1918.

I used the opportunity to also add comments and references to the existing code of the von Mises-Fisher sampler.

@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.02%. Comparing base (3de6038) to head (ca68082).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1930      +/-   ##
==========================================
+ Coverage   85.99%   86.02%   +0.02%     
==========================================
  Files         144      144              
  Lines        8685     8702      +17     
==========================================
+ Hits         7469     7486      +17     
  Misses       1216     1216              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Sampling from von Mises Fisher yields NaN
2 participants