Skip to content

Commit 9d86603

Browse files
committed
update seed to 0
1 parent 8bc1646 commit 9d86603

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

lectures/ar1_bayes.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ kernelspec:
1919
In addition to what's included in base Anaconda, we need to install the following package:
2020

2121
```{code-cell} ipython3
22-
:tags: [hide-output]
22+
:tags: [no-execute, hide-output]
2323
2424
!pip install numpyro
2525
```
@@ -145,7 +145,7 @@ def ar1_simulate(ρ, σ, y0, T, key):
145145
ρ = 0.5
146146
T = 50
147147
148-
key = random.PRNGKey(145353452)
148+
key = random.PRNGKey(0)
149149
y = ar1_simulate(ρ, σ, 10.0, T, key)
150150
```
151151
@@ -189,6 +189,16 @@ def plot_posterior(sample):
189189
axs[1, 0].set_ylabel("σ")
190190
axs[1, 1].set_xlabel("σ")
191191
192+
# Unify the y-axis limits for trace plots
193+
max_ylim = max(axs[0, 0].get_ylim()[1], axs[1, 0].get_ylim()[1])
194+
axs[0, 0].set_ylim(0, max_ylim)
195+
axs[1, 0].set_ylim(0, max_ylim)
196+
197+
# Unify the x-axis limits for histograms
198+
max_xlim = max(axs[0, 1].get_xlim()[1], axs[1, 1].get_xlim()[1])
199+
axs[0, 1].set_xlim(0, max_xlim)
200+
axs[1, 1].set_xlim(0, max_xlim)
201+
192202
plt.tight_layout()
193203
plt.show()
194204
```

0 commit comments

Comments
 (0)