sprior = sp.array([1.]*(d+1)) kernel = [kindex,prior,sprior] nreps = 5 bd = 15 slist = [1e-4,1e-6,1e-8] f,a = plt.subplots(2) for s in slist: names = ["../cache/rosennoise/EIMLE_"+str(int(100*sp.log10(s)))+"_"+str(pwr)+"_"+str(i)+".p" for i in xrange(nreps)] results = search.multiMLEFS(ojf,lb,ub,kernel,s,bd,names) yr = [r[11].flatten() for r in results] C = results[0][5] names = ["../cache/rosennoise/PESFS_"+str(int(100*sp.log10(s)))+"_"+str(pwr)+"_"+str(i)+".p" for i in xrange(nreps)] results = search.multiPESFS(ojf,lb,ub,kernel,s,bd,names) zr = [r[11].flatten() for r in results] C = results[0][5] Z = sp.vstack(yr) m = sp.mean(sp.log10(Z),axis=0) v = sp.var(sp.log10(Z),axis=0) sq = sp.sqrt(v) a[1].fill_between(sp.array([sum(C[:j]) for j in xrange(len(C))]),(m-sq).flatten(),(m+sq).flatten(),facecolor='lightblue',edgecolor='lightblue',alpha=0.5) a[1].plot([sum(C[:j]) for j in xrange(len(C))],m.flatten(),'x-') Z = sp.vstack(zr) m = sp.mean(sp.log10(Z),axis=0)
kindex = GPdc.MAT52CS prior = sp.array([0.] + [-1.] * d + [-2.]) sprior = sp.array([1.] + [1.] * d + [2.]) kernel = [kindex, prior, sprior] #lets start with EI lb = sp.array([[-1] * d]) ub = sp.array([[1] * d]) budget = 20 fnames = ['../cache/fith/EI{}.p'.format(i) for i in xrange(5)] statesEI = search.multiMLEFS(ojf, lb, ub, kernel, 1., budget, fnames) fnames = ['../cache/fith/PE{}.p'.format(i) for i in xrange(5)] statesPE = search.multiPESFS(ojf, lb, ub, kernel, 1., budget, fnames) kindex = GPdc.MAT52CS prior = sp.array([0.] + [-1.] * (d + 1) + [-2.]) sprior = sp.array([1.] * (d + 2) + [2.]) kernel = [kindex, prior, sprior] fnames = ["../cache/fith/PI{}.p".format(i) for i in xrange(5)] statesPI = search.multiPESIPS(ojfa, lb, ub, kernel, 10, fnames) x = [] y = [] for stateEI in statesEI: a[2].plot(stateEI[11], 'r') #a[3].plot([sum(stateEI[5][:i]) for i in xrange(len(stateEI[5]))],stateEI[11],'r') x.append([sum(stateEI[5][:i]) for i in xrange(len(stateEI[5]))])
prior = sp.array([0.]+[-1.]*d+[-2.]) sprior = sp.array([1.]+[1.]*d+[2.]) kernel = [kindex,prior,sprior] #lets start with EI lb = sp.array([[-1]*d]) ub = sp.array([[1]*d]) budget = 20 fnames = ['../cache/fith/EI{}.p'.format(i) for i in xrange(5)] statesEI=search.multiMLEFS(ojf,lb,ub,kernel,1.,budget,fnames) fnames = ['../cache/fith/PE{}.p'.format(i) for i in xrange(5)] statesPE=search.multiPESFS(ojf,lb,ub,kernel,1.,budget,fnames) kindex = GPdc.MAT52CS prior = sp.array([0.]+[-1.]*(d+1)+[-2.]) sprior = sp.array([1.]*(d+2)+[2.]) kernel = [kindex,prior,sprior] fnames = ["../cache/fith/PI{}.p".format(i) for i in xrange(5)] statesPI = search.multiPESIPS(ojfa,lb,ub,kernel,10,fnames) x=[] y=[] for stateEI in statesEI: a[2].plot(stateEI[11],'r')