Skip to content

Instantly share code, notes, and snippets.

@jcbozonier
Created January 30, 2017 23:28
Show Gist options
  • Save jcbozonier/8557dc87ca03ddff04df59acb5c1434d to your computer and use it in GitHub Desktop.
Save jcbozonier/8557dc87ca03ddff04df59acb5c1434d to your computer and use it in GitHub Desktop.
Updating our probabilities
hypotheses = [[1/3,1/3,1/3],
[.8, .1, .1],
[.1, .8, .1],
[.1, .1, .8]]
# Updated probabilities
pdf_score = np.array([ss.dirichlet.pdf(hypothesis, [1+1+1, 1+5+4, 1+2+4]) for hypothesis in hypotheses])
probabilities = pdf_score/pdf_score.sum()
list(zip(hypotheses, probabilities))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment