Skip to content
Snippets Groups Projects
Commit 42d911f7 authored by Martin Renoult's avatar Martin Renoult
Browse files

Update Bayesian_for_LGM_PMIP

parent a7f74799
No related branches found
No related tags found
No related merge requests found
...@@ -118,6 +118,8 @@ with Model() as model: # model specifications in PyMC3 are wrapped in a with-sta ...@@ -118,6 +118,8 @@ with Model() as model: # model specifications in PyMC3 are wrapped in a with-sta
# Inference! 4 jobs in parallel (convergence check) # Inference! 4 jobs in parallel (convergence check)
# By default, the sampling method is NUTS # By default, the sampling method is NUTS
# The following line will not work with PyMC3 older than 3.8. If you use an
# older version, replace "cores=4" by "njobs=4"
trace = sample(progressbar=False, draws=2000, cores=4) trace = sample(progressbar=False, draws=2000, cores=4)
# Extract the data of the trace # Extract the data of the trace
...@@ -222,7 +224,7 @@ posterior = np.random.choice(prior_S, size=8000, p=weight) ...@@ -222,7 +224,7 @@ posterior = np.random.choice(prior_S, size=8000, p=weight)
post_median = np.median(posterior) post_median = np.median(posterior)
post_std = np.std(posterior) post_std = np.std(posterior)
# Compute 90% minimum width interval . Careful, different than 5-95% # Compute 90% minimum width interval. Careful, different than 5-95%
#post_stats_95 = stats.hpd(posterior, alpha=0.1) #post_stats_95 = stats.hpd(posterior, alpha=0.1)
#post_stats_33 = stats.hpd(posterior, alpha=0.33) #post_stats_33 = stats.hpd(posterior, alpha=0.33)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment