New files

This commit is contained in:
Ricardo 2014-01-28 13:46:42 +00:00
parent 7782f62885
commit 1ab26de56e
8 changed files with 540 additions and 0 deletions

View file

@ -0,0 +1,28 @@
# Copyright (c) 2012, GPy authors (see AUTHORS.txt).
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import pylab as pb
#import numpy as np
#import Tango
#from base_plots import gpplot, x_frame1D, x_frame2D
def plot_optimizer(optimizer):
if optimizer.trace == None:
print "No trace present so I can't plot it. Please check that the optimizer actually supplies a trace."
else:
pb.figure()
pb.plot(optimizer.trace)
pb.xlabel('Iteration')
pb.ylabel('f(x)')
def plot_sgd_traces(optimizer):
pb.figure()
pb.subplot(211)
pb.title('Parameters')
for k in optimizer.param_traces.keys():
pb.plot(optimizer.param_traces[k], label=k)
pb.legend(loc=0)
pb.subplot(212)
pb.title('Objective function')
pb.plot(optimizer.fopt_trace)