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

Von Mises Distribution #818

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Conversation

mborland
Copy link
Member

@mborland mborland commented Aug 15, 2022

#330 looked very close to completion so this is my attempt to foster it. Also see #296

@mborland
Copy link
Member Author

@NAThompson This should be good for review. The only major outstanding change from the last cut at this was removing all the double precision magic numbers which I have. I would have just made the edits on the linked PR, but since the guy deleted his account I can't access the branch.


[h4 Member Functions]

von_mises_distribution(RealType mean = 0, RealType concentration = 1); ;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@jzmaddock : IIRC we now use Real instead of RealType? Obviously a nitpick.

All the [link math_toolkit.dist_ref.nmp usual non-member accessor functions]
that are generic to all distributions are supported: __usual_accessors.

The domain of the random variable is O <= x <= 2[pi].
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe use “≤” (U+2264) which I think is \u2264 in .qbk?

{
*result = policies::raise_domain_error<RealType>(
function,
"Angle parameter is %1%, but must be between -pi and +pi!", angle, pol);
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the CDF is periodic, is it sensible to restrict the angle like this?


[h4 Accuracy]

The CDF of this distribution is not analytic so an approximation is made.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does the approximation mean that multiprecision types should be rejected?

// Check symmetry of PDF and CDF
test_symmetry(0.0F);
test_symmetry(0.0);
test_symmetry(0.0L);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might we test the quadrature of the pdf = 1?

@NAThompson
Copy link
Collaborator

@mborland : I've approved, but with the caveat that I don't know much about this. We'll probably want a second review from @jzmaddock .

@AreaZR
Copy link
Contributor

AreaZR commented Oct 25, 2022

Any update on this?

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.

3 participants