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 - exp() and besseli() max out to inf if kappa becomes large #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

schoffelen
Copy link

This fix addresses the case when the computation of the likelihood results in non-finite values, due the exp() and besseli() maxing out.

@schoffelen
Copy link
Author

Note that this probably relate to issue #2

@schoffelen
Copy link
Author

By the way, thanks for sharing this code.

@schoffelen
Copy link
Author

I misinterpreted the brackets in the compLik computation the first time around. I think the new replacement value for the Likelihood makes more sense, in case the ratio exp(K.cos())./(2pi*besseli(0,K)) nans out.

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.

1 participant