Skip to content
Snippets Groups Projects
Commit a69f0017 authored by Steve Schmerler's avatar Steve Schmerler
Browse files

gp: 02_two_dim: sync noise test with 01_one_dim

parent be6e55ed
No related branches found
No related tags found
1 merge request!2Update GP slides and notebooks
...@@ -336,16 +336,24 @@ for ax, c in zip(axs, cs): ...@@ -336,16 +336,24 @@ for ax, c in zip(axs, cs):
fig.colorbar(c, ax=ax) fig.colorbar(c, ax=ax)
# - # -
# # Check learned noise
# # Let's check the learned noise
# + # +
print((post_pred_y.stddev**2 - post_pred_f.stddev**2).mean().sqrt()) # Target noise to learn
print("data noise:", noise_std)
# The two below must be the same
print(
"learned noise:",
(post_pred_y.stddev**2 - post_pred_f.stddev**2).mean().sqrt().item(),
)
print( print(
"learned noise:",
np.sqrt( np.sqrt(
extract_model_params(model, raw=False)["likelihood.noise_covar.noise"] extract_model_params(model, raw=False)["likelihood.noise_covar.noise"]
),
) )
)
print(noise_std)
# - # -
# # Plot confidence bands # # Plot confidence bands
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment