GPax and Active Learning#
! pip install git+https://github.com/ziatdinovmax/gpax -q
%load_ext autoreload
%autoreload 2
..include:: .gpax_and_al.py
import numpy as np
import matplotlib.pyplot as plt
from plotting import ACQ_COLORS
def plot_all_mse():
FN = "./gpax_figures/dataset_{i}/{acq}/mse.txt"
for i in [1, 2, 3]:
plt.figure()
for acq, col in ACQ_COLORS.items():
mse = np.loadtxt(FN.format(i=i, acq=acq))
plt.plot(mse, color=col, label=acq)
plt.legend()
plt.axhline(0, color='k', linestyle='--')
plt.ylabel("MSE")
plt.xlabel("Iteration")
plt.tight_layout()
plt.savefig(f'./gpax_figures/dataset_{i}/mse.png')
plt.close()
plot_all_mse()
