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

Re-introduce normalize #243

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Re-introduce normalize #243

wants to merge 1 commit into from

Conversation

idontgetoutmuch
Copy link
Member

No description provided.

@turion
Copy link
Collaborator

turion commented Jan 11, 2023

Intends to close #241


-- | Normalizes the weights in the population so that their sum is 1.
normalize :: (Monad m) => Population m a -> Population m a
normalize = hoist unweighted . extractEvidence
Copy link
Collaborator

Choose a reason for hiding this comment

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

unweighted used to be called prior https://hackage.haskell.org/package/monad-bayes-0.1.1.0/docs/src/Control.Monad.Bayes.Population.html#normalize, so I guess this is the same implementation as before. Shouldn't we restore the comment about bias here?

@turion
Copy link
Collaborator

turion commented Jan 11, 2023

In test/TestInference.hs, you should hide the import normalize from Population

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