-
Notifications
You must be signed in to change notification settings - Fork 229
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
Circular distributions #296
Comments
Not an unreasonable request. Looks like all the building blocks are already in Boost.Math. Got a number of other things to do at the moment, but I'll try to get this added as time permits. |
Is there anything I can do to assist you? |
@pcjmuenster : If you want to submit a PR I could help with the details. I'd probably just |
Looking at the Von Mises distribution wiki, the mean, variance, mode, pdf and entropy are straightforward. The only one that would require significant testing is the CDF. Also a decision would have to be made about the In fact this is a good first task for anyone who wants to learn how to contribute to the library. |
@NAThompson Thanks, I will try to look into it this weekend. |
Notes in case of my unforeseen death: |
@pcjmuenster : Could direct numerical quadrature work in the case where the series converges slowly? We have quite a few quadrature routines available, though some require expensive node-weight precomputation. Note that the general goal is 1ULP evaluation in arbitrary precision; see here; you can create the plots using my garbage software here. |
I have worked on the CDF yesterday and came across the following issue: |
@pcjmuenster : My opinion, such as it is, is that as long as it is documented, it's fine to have the support be @jzmaddock, @pabristow : What's your opinion? |
Glad you are yet to meet an unforeseen premature demise ;-) [mu-pi, mu+pi] looks fine by me - it only vital to do what it says on the tin. I don't think we have been very precise what 'support' is anyway? |
Yeah, for periodic functions, |
Independent of the return value of |
@pcjmuenster : I think this will require writing very careful error messages that self-document the requirements of the function. I might start with the definition Also, should µ be constrained? |
I tried every trick I know (not many) to increase the precision. But even then most functions don't work for distributions with |
@jzmaddock is a man who knows a very lot of precision tricks. https://en.wikipedia.org/wiki/Von_Mises_distribution says "as {\displaystyle \kappa }\kappa increases, the distribution approaches a normal distribution in x with mean μ and variance 1/{\displaystyle \kappa }\kappa " So would normal do at some (computable) cross-over point? Or be close enough approximation that some 'adjustment' could be made? |
@pcjmuenster : Open a PR and we can see what you're doing. |
May math knowledge is quite limited. But in the past, I more than once had to deal with circular data. I usually use a Von Mises distribution to approximate my data. Having support in Boost.Math would have been very helpful back then.
The text was updated successfully, but these errors were encountered: