Last active
February 4, 2021 03:10
-
-
Save tiagofer/c02c1273850b55f011b3766fb7aa0572 to your computer and use it in GitHub Desktop.
This file contains 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
with pm.Model() as model_30: | |
#priori | |
p_30 = pm.Uniform('p_30',lower=0, upper=1) | |
#likelihood | |
obs_30 = pm.Bernoulli('obs_30', p_30, observed=g30_1) | |
#MCMC | |
step = pm.Metropolis() | |
trace = pm.sample(2000, step = step) | |
#remove os primeiros 1000 parâmetros que tendem a ser mais ruidosos | |
burned_trace_30 = trace[1000:] | |
with pm.Model() as model_40: | |
p_40 = pm.Uniform('p_40',lower=0, upper=1) | |
obs_40 = pm.Bernoulli('obs_40', p_40, observed=g40_1) | |
step = pm.Metropolis() | |
trace = pm.sample(2000, step = step) | |
burned_trace_40 = trace[1000:] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment