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

Refactor Jensen-Shannon divergence calculation to handle small or zero probabilities #106

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

Conversation

Jpowell94
Copy link

Adjusted the Jensen-Shannon divergence calculation in the jensenShannon function to address potential issues with small or zero probabilities. Introduced a small epsilon value (eps = 1e-10) to prevent taking the logarithm of zero and division by zero. This adjustment ensures stability and avoids errors in cases where probabilities are close to zero.

…o probabilities

Adjusted the Jensen-Shannon divergence calculation in the jensenShannon function to address potential issues with small or zero probabilities. Introduced a small epsilon value (eps = 1e-10) to prevent taking the logarithm of zero and division by zero. This adjustment ensures stability and avoids errors in cases where probabilities are close to zero.
added missing curly brace.
@Jpowell94
Copy link
Author

please let me know what you think and what I can do to help!

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