Commit d513f2e3 authored by Bill Engels's avatar Bill Engels

rerun black

parent d322843b
......@@ -167,7 +167,7 @@
],
"source": [
"n = 200 # The number of data points\n",
"X = np.linspace(0, 10, n)[:, None] # The inputs to the GP, they must be arranged as a column vector\n",
"X = np.linspace(0, 10, n)[:, None] # The inputs to the GP must be arranged as a column vector\n",
"\n",
"# Define the true covariance function and its parameters\n",
"ℓ_true = 1.0\n",
......@@ -334,8 +334,10 @@
],
"source": [
"# check Rhat, values above 1 may indicate convergence issues\n",
"n_nonconverged = int(np.sum(az.rhat(trace)[['η', 'ℓ', 'f_rotated_']].to_array() > 1.03).values)\n",
"print('%i variables MCMC chains appear not to have converged.' % n_nonconverged) "
"n_nonconverged = int(\n",
" np.sum(az.rhat(trace)[[\"η\", \"ℓ\", \"f_rotated_\"]].to_array() > 1.03).values\n",
")\n",
"print(\"%i variables MCMC chains appear not to have converged.\" % n_nonconverged)"
]
},
{
......@@ -805,8 +807,10 @@
],
"source": [
"# check Rhat\n",
"n_nonconverged = int(np.sum(az.rhat(trace)[['η', 'ℓ', 'f_rotated_']].to_array() > 1.03).values)\n",
"print('%i variables MCMC chains appear not to have converged.' % n_nonconverged) "
"n_nonconverged = int(\n",
" np.sum(az.rhat(trace)[[\"η\", \"ℓ\", \"f_rotated_\"]].to_array() > 1.03).values\n",
")\n",
"print(\"%i variables MCMC chains appear not to have converged.\" % n_nonconverged)"
]
},
{
......@@ -949,7 +953,7 @@
"plt.xlabel(\"X\")\n",
"plt.ylabel(\"True f(x)\")\n",
"plt.title(\"Posterior distribution over $f(x)$ at the observed values\")\n",
"plt.legend(loc='upper right');"
"plt.legend(loc=\"upper right\");"
]
},
{
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment