Created
November 28, 2018 02:24
-
-
Save WillKoehrsen/6fc2c6d86f9135a24144d6e7b4445add to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymc3 as pm | |
import numpy as np | |
alphas = np.array([1, 1, 1]) | |
c = np.array([3, 2, 1]) | |
# Create model | |
with pm.Model() as model: | |
# Parameters of the Multinomial are from a Dirichlet | |
parameters = pm.Dirichlet('parameters', a=alphas, shape=3) | |
# Observed data is from a Multinomial distribution | |
observed_data = pm.Multinomial( | |
'observed_data', n=6, p=parameters, shape=3, observed=c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment