def plot_pred_ll_vs_time(static_pll, emp_pll,
                         sbm_gp_timestamps, sbm_gp_plls, sbm_avg_pll,
                         lnm_gp_timestamps, lnm_gp_plls, lnm_avg_pll,
                         results_dir=".",
                         begin_test_year=2012, end_test_year=2013,
                         norm=1, baseline=0, burnin=0
                         ):
    # Plot predictive log likelihoods over time
    fig = plt.figure(figsize=(0.38*5.25, 0.45*5.25))
    fig.set_tight_layout(True)

    min_time = lnm_gp_timestamps[burnin]
    max_time = sbm_gp_timestamps[-1]
    # plt.plot(pred_lls, lw=2, color=colors[0], label="LSB GP")
    plt.plot(sbm_gp_timestamps[burnin:], (sbm_gp_plls[burnin:] - baseline) / norm, lw=2, color=colors[0], label="SBM GP")
    plt.plot([min_time, max_time], (sbm_avg_pll - baseline) / norm* np.ones(2), ls='--', color=colors[0])

    plt.plot(lnm_gp_timestamps[burnin:], (lnm_gp_plls[burnin:] - baseline) / norm, lw=2, color=colors[1], label="LNM GP")
    plt.plot([min_time, max_time], (lnm_avg_pll - baseline) / norm * np.ones(2), ls='--', color=colors[1])

    plt.plot([0, max_time], (emp_pll - baseline) / norm * np.ones(2), lw=2, color=colors[2], label="Raw GP")
    # plt.plot([0, max_time], (static_pll - baseline) / norm * np.ones(2), lw=2, color=colors[3], label="2011 Values")

    plt.xscale("log")
    plt.xlim(min_time, max_time)

    # plt.plot(sbm_gp_plls, lw=2, color=colors[3], label="LNM GP")
    # plt.plot([0, N_samples], sbm_avg_pll * np.ones(2), ls='--', color=colors[3])

    plt.legend(loc="lower right", prop={"size": 8})

    plt.xlabel("Time [sec] (log scale)")
    plt.xscale("log")

    plt.ylabel("Pred. LL [nats/name]")
    # plt.ylim(0,0.35)
    # plt.title("Census (%d-%d)" % (begin_test_year, end_test_year))

    # plt.ion()
    plt.show()
    # plt.tight_layout()

    plt.savefig(os.path.join(results_dir, "census_pred_ll_vs_time.pdf"))


############
#  script  #
############
dataset/ETHPy150Open HIPS/pgmult/experiments/census_gp.py/plot_pred_ll_vs_time/original