@@ -0,0 +1,1359 @@
+import numpy as np%0Aimport benchfunk%0Aimport reggie%0A%0Aimport mwhutils.plotting as mp%0Aimport mwhutils.grid as mg%0A%0Afrom pybo import inits%0Afrom pybo import policies%0Afrom pybo import solvers%0Afrom pybo import recommenders%0A%0A%0Aif __name__ == '__main__':%0A    # grab a test function and points at which to plot things%0A    s = 0.001%0A    model = reggie.make_gp(s, 1.1, 0.05, 0)%0A    bounds = %5B%5B0, 5%5D%5D%0A%0A    f = benchfunk.PriorFunction(model, bounds, 100)%0A    x = mg.regular(bounds, 500)%0A%0A    # get initial data%0A    X = inits.init_latin(bounds, 1)%0A    Y = np.array(%5Bf(x_) for x_ in X%5D)%0A%0A    # initialize the model%0A    model.add_data(X, Y)%0A%0A    while True:%0A        xbest = recommenders.best_latent(model, bounds)%0A        index = policies.PES(model, bounds)(x)%0A        xnext = x%5Bindex.argmax()%5D%0A%0A        # get the posterior at test points%0A        mu, s2 = model.predict(x)%0A%0A        # create a figure and hold it%0A        fig = mp.figure(num=1, rows=2)%0A        fig.hold()%0A%0A        # plot the posterior%0A        fig%5B0%5D.plot_banded(x.ravel(), mu, 2*np.sqrt(s2))%0A        fig%5B0%5D.plot(x.ravel(), f.get_f(x))%0A        fig%5B0%5D.scatter(model.data%5B0%5D.ravel(), model.data%5B1%5D)%0A        fig%5B0%5D.vline(xbest)%0A%0A        # plot the acquisition function%0A        fig%5B1%5D.plot_banded(x.ravel(), index)%0A        fig%5B1%5D.vline(xnext)%0A%0A        # draw%0A        fig.draw()%0A%0A        model.add_data(xnext, f(xnext))%0A

Add a PES basic demo.