Path: blob/master/notebooks/book1/11/multi_collinear_legs_numpyro.ipynb
1192 views
Kernel: Python [conda env:probml_py3912]
In [3]:
Out[3]:
jax version 0.3.7
jax backend cpu
100%|██████████| 2000/2000 [00:01<00:00, 1849.10it/s, init loss: 67561.8828, avg. loss [1901-2000]: 113.4428]
mean std median 2.5% 97.5% n_eff r_hat
a 0.96 0.33 0.94 0.30 1.56 1049.96 1.00
bl 2.63 2.45 2.69 -2.54 6.94 847.98 1.00
br -0.61 2.44 -0.65 -5.46 3.99 839.21 1.00
sigma 0.63 0.04 0.63 0.55 0.72 970.09 1.00
/home/patel_zeel/miniconda3/envs/probml_py3912/lib/python3.9/site-packages/probml_utils/plotting.py:74: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
/home/patel_zeel/miniconda3/envs/probml_py3912/lib/python3.9/site-packages/probml_utils/plotting.py:74: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
/home/patel_zeel/miniconda3/envs/probml_py3912/lib/python3.9/site-packages/probml_utils/plotting.py:74: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
/tmp/ipykernel_21679/3393533003.py:178: UserWarning: There are not enough devices to run parallel chains: expected 4 but got 1. Chains will be drawn sequentially. If you are running MCMC in CPU, consider using `numpyro.set_host_device_count(4)` at the beginning of your program. You can double-check how many devices are available in your system using `jax.local_device_count()`.
mcmc = MCMC(kernel, num_warmup=500, num_samples=500, num_chains=4)
sample: 100%|██████████| 1000/1000 [00:04<00:00, 242.91it/s, 511 steps of size 4.08e-03. acc. prob=0.95]
sample: 100%|██████████| 1000/1000 [00:01<00:00, 820.25it/s, 1023 steps of size 4.81e-03. acc. prob=0.93]
sample: 100%|██████████| 1000/1000 [00:01<00:00, 838.60it/s, 1023 steps of size 5.04e-03. acc. prob=0.92]
sample: 100%|██████████| 1000/1000 [00:01<00:00, 839.16it/s, 1023 steps of size 4.01e-03. acc. prob=0.91]
/home/patel_zeel/miniconda3/envs/probml_py3912/lib/python3.9/site-packages/probml_utils/plotting.py:74: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
mean std median 5.0% 95.0% n_eff r_hat
a 0.97 0.34 0.97 0.42 1.54 1374.63 1.00
bl 1.69 2.41 1.77 -2.18 5.53 579.65 1.00
br 0.32 2.40 0.22 -3.52 4.19 580.43 1.00
sigma 0.65 0.05 0.64 0.56 0.72 1047.10 1.00
Number of divergences: 0
mean std median 2.5% 97.5% n_eff r_hat
a 0.97 0.34 0.97 0.31 1.65 1369.27 1.00
bl 1.69 2.41 1.77 -3.27 6.03 570.54 1.00
br 0.32 2.40 0.22 -3.88 5.31 571.21 1.00
sigma 0.65 0.05 0.64 0.54 0.73 1044.93 1.00
/home/patel_zeel/miniconda3/envs/probml_py3912/lib/python3.9/site-packages/probml_utils/plotting.py:74: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
/home/patel_zeel/miniconda3/envs/probml_py3912/lib/python3.9/site-packages/probml_utils/plotting.py:74: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
sample: 100%|██████████| 1000/1000 [00:04<00:00, 246.14it/s, 55 steps of size 2.12e-02. acc. prob=0.83]
sample: 100%|██████████| 1000/1000 [00:00<00:00, 1104.82it/s, 255 steps of size 1.64e-02. acc. prob=0.83]
sample: 100%|██████████| 1000/1000 [00:00<00:00, 1122.37it/s, 255 steps of size 2.07e-02. acc. prob=0.79]
sample: 100%|██████████| 1000/1000 [00:00<00:00, 1175.79it/s, 127 steps of size 2.27e-02. acc. prob=0.50]
mean std median 5.0% 95.0% n_eff r_hat
a 1.02 0.36 1.02 0.47 1.58 89.77 1.03
bl 1.35 0.45 1.41 0.58 1.97 35.11 1.05
br 0.65 0.43 0.60 0.03 1.31 37.82 1.05
sigma 0.65 0.05 0.65 0.57 0.72 86.17 1.03
Number of divergences: 115
mean std median 2.5% 97.5% n_eff r_hat
a 1.02 0.36 1.02 0.35 1.70 92.47 1.00
bl 1.35 0.45 1.41 0.51 1.99 36.23 1.03
br 0.65 0.43 0.60 0.02 1.38 39.92 1.03
sigma 0.65 0.05 0.65 0.56 0.74 83.12 1.01
/home/patel_zeel/miniconda3/envs/probml_py3912/lib/python3.9/site-packages/probml_utils/plotting.py:74: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
/home/patel_zeel/miniconda3/envs/probml_py3912/lib/python3.9/site-packages/probml_utils/plotting.py:74: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
/home/patel_zeel/miniconda3/envs/probml_py3912/lib/python3.9/site-packages/probml_utils/plotting.py:74: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
In [ ]: