if "calibrate" in cmd:
	pyapemost.calibrate()
# run APEMoST
if "run" in cmd:
	w = pyapemost.watch.ProgressWatcher()
	w.start()
	pyapemost.run(max_iterations = 10000, append = False)
	w.stop()

# lets analyse the results
if "analyse" in cmd:
	plotter = pyapemost.analyse.VisitedAllPlotter()
	plotter.plot()
	show("chain0.pdf")
	histograms = pyapemost.create_histograms()
	i = 1
	plt.clf()
	plt.figure(figsize=(7, 4 * len(histograms)))
	for k,(v,stats) in histograms.iteritems():
		plt.subplot(len(histograms), 1, i)
		plt.plot(v[:,0], v[:,2], ls='steps--', label=k)
		plt.legend()
		print k, stats
		i = i + 1
	plt.savefig("marginals.pdf")
	show("marginals.pdf")
	
	print pyapemost.model_probability()


Example #2
0
    cmd = sys.argv[1:]

if "calibrate" in cmd:
    pyapemost.calibrate()
# run APEMoST
if "run" in cmd:
    w = pyapemost.watch.ProgressWatcher()
    w.start()
    pyapemost.run(max_iterations=10000, append=False)
    w.stop()

# lets analyse the results
if "analyse" in cmd:
    plotter = pyapemost.analyse.VisitedAllPlotter()
    plotter.plot()
    show("chain0.pdf")
    histograms = pyapemost.create_histograms()
    i = 1
    plt.clf()
    plt.figure(figsize=(7, 4 * len(histograms)))
    for k, (v, stats) in histograms.items():
        plt.subplot(len(histograms), 1, i)
        plt.plot(v[:, 0], v[:, 2], ls='steps--', label=k)
        plt.legend()
        print(k, stats)
        i = i + 1
    plt.savefig("marginals.pdf")
    show("marginals.pdf")

    print(pyapemost.model_probability())
Example #3
0
if "calibrate" in cmd:
	pyapemost.calibrate()
# run APEMoST
if "run" in cmd:
	w = pyapemost.watch.ProgressWatcher()
	w.start()
	pyapemost.run(max_iterations = 10000, append = False)
	w.stop()

# lets analyse the results
if "analyse" in cmd:
	plotter = pyapemost.analyse.VisitedAllPlotter()
	plotter.plot()
	show("chain0.pdf")
	histograms = pyapemost.create_histograms()
	i = 1
	plt.clf()
	plt.figure(figsize=(7, 4 * len(histograms)))
	for k,(v,stats) in histograms.items():
		plt.subplot(len(histograms), 1, i)
		plt.plot(v[:,0], v[:,2], ls='steps--', label=k)
		plt.legend()
		print(k, stats)
		i = i + 1
	plt.savefig("marginals.pdf")
	show("marginals.pdf")
	
	print(pyapemost.model_probability())