def make_fig_3()

in figs/fig_3.py [0:0]


def make_fig_3():
    # Load in simulation results
    with open('data/fig3_sim_output.pckl', 'rb') as fin:
        (test_Y, f1, var1, f2, var2, f3, var3) = pickle.load(fin)
    
    fig = plt.figure(figsize=(2.63, 1.45))

    ax = fig.add_subplot(121)
    ax.errorbar(
        x=test_Y.numpy(), y=f3.numpy(), yerr = 2 * np.sqrt(var3.numpy()),
        c='gray', lw=1, ls='', marker='.', mfc='k', mec='k', ms=3
    )
    x0 = -2.5
    x1 = 0.5
    ax.plot([x0, x1], [x0, x1],  '-', zorder=-5, alpha=0.5, c='steelblue', lw=2)
    ax.set_xlim([x0, x1])
    ax.set_ylim([x0, x1])
    ax.set_yticks([0, -1, -2])
    ax.set_xlabel('True value', fontsize=9)
    ax.set_ylabel('Model prediction', fontsize=9)
    ax.set_title('ARD RBF', fontsize=9)
    ax.grid(True, alpha=0.2)

    ax = fig.add_subplot(122)
    ax.errorbar(
        x=test_Y.numpy(), y=f1.numpy(), yerr = 2 * np.sqrt(var1.numpy()),
        c='gray', lw=1, ls='', marker='.', mfc='k', mec='k', ms=3
    )
    x0 = -3
    x1 = 1
    ax.plot([x0, x1], [x0, x1],  '-', zorder=-5, alpha=0.5, c='steelblue', lw=2)
    ax.set_xlim([x0, x1])
    ax.set_ylim([x0, x1])
    ax.set_title('Mahalanobis', fontsize=9)
    ax.set_xticks([-3, -2, -1, 0, 1])
    ax.set_xlabel('True value', fontsize=9)
    ax.grid(True, alpha=0.2)

    plt.subplots_adjust(right=0.99, bottom=0.24, left=0.16, top=0.87, wspace=0.3)
    plt.savefig('pdfs/ard_mahalanobis.pdf', pad_inches=0)