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

01_one_dim: better plotting layout

parent 744a7045
Branches
No related tags found
1 merge request!2Update GP slides and notebooks
......@@ -354,7 +354,10 @@ for ii in range(n_iter):
# Plot hyper params and loss (negative log marginal likelihood) convergence
ncols = len(history)
fig, axs = plt.subplots(ncols=ncols, nrows=1, figsize=(ncols * 5, 5))
fig, axs = plt.subplots(
ncols=ncols, nrows=1, figsize=(ncols * 3, 3), layout="compressed"
)
with torch.no_grad():
for ax, (p_name, p_lst) in zip(axs, history.items()):
ax.plot(p_lst)
ax.set_title(p_name)
......@@ -387,7 +390,7 @@ with torch.no_grad():
post_pred_f = model(X_pred)
post_pred_y = likelihood(model(X_pred))
fig, axs = plt.subplots(ncols=2, figsize=(12, 5), sharex=True, sharey=True)
fig, axs = plt.subplots(ncols=2, figsize=(14, 5), sharex=True, sharey=True)
fig_sigmas, ax_sigmas = plt.subplots()
for ii, (ax, post_pred, name, title) in enumerate(
zip(
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment