|
20 | 20 | "import matplotlib.pyplot as plt\n", |
21 | 21 | "import pymc3 as pm\n", |
22 | 22 | "from ipywidgets import interact\n", |
| 23 | + "import arviz as az\n", |
23 | 24 | "%matplotlib inline\n", |
24 | 25 | "sns.set()" |
25 | 26 | ] |
|
374 | 375 | "with Model:\n", |
375 | 376 | " samples = pm.sample(2000, njobs=1)\n", |
376 | 377 | "\n", |
377 | | - "pm.plot_posterior(samples);" |
| 378 | + "az.plot_posterior(samples, kind='hist');" |
378 | 379 | ] |
379 | 380 | }, |
380 | 381 | { |
|
458 | 459 | "with model:\n", |
459 | 460 | " samples = pm.sample(2000, njobs=1)\n", |
460 | 461 | " \n", |
461 | | - "pm.plot_posterior(samples);" |
| 462 | + "az.plot_posterior(samples);" |
462 | 463 | ] |
463 | 464 | }, |
464 | 465 | { |
|
540 | 541 | "source": [ |
541 | 542 | "with Model:\n", |
542 | 543 | " samples = pm.sample(2000, njobs=1)\n", |
543 | | - "pm.plot_posterior(samples);" |
| 544 | + "az.plot_posterior(samples, kind='hist');" |
544 | 545 | ] |
545 | 546 | }, |
546 | 547 | { |
|
598 | 599 | "# bust it out & sample\n", |
599 | 600 | "with model:\n", |
600 | 601 | " samples = pm.sample(2000, njobs=1)\n", |
601 | | - "pm.plot_posterior(samples, varnames=['μ_1', 'μ_2', 'diff_means', 'effect_size']);" |
| 602 | + "az.plot_posterior(samples, var_names=['μ_1', 'μ_2', 'diff_means', 'effect_size'], kind='hist');" |
602 | 603 | ] |
603 | 604 | } |
604 | 605 | ], |
|
618 | 619 | "name": "python", |
619 | 620 | "nbconvert_exporter": "python", |
620 | 621 | "pygments_lexer": "ipython3", |
621 | | - "version": "3.6.6" |
| 622 | + "version": "3.6.8" |
622 | 623 | } |
623 | 624 | }, |
624 | 625 | "nbformat": 4, |
|
0 commit comments