Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

nitishmalang
Copy link
Contributor

Hey @ankurankan,

Closes #2098. Adds input validation to DiscreteFactor.__init__ in pgmpy/factors/discrete/DiscreteFactor.py, ensuring probabilities are non-negative and sum to 1 (tolerance 1e-5) for for NumPy and PyTorch backends. Tests will be submitted in a separate PR.

@ankurankan
Copy link
Member

Have a look at my comment in #2098. And the tests always need to be in the same PR, so please add tests as well.

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.

2 participants