mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-04 17:22:39 +02:00
New files
This commit is contained in:
parent
7782f62885
commit
1ab26de56e
8 changed files with 540 additions and 0 deletions
28
GPy/plotting/matplot_dep/inference_plots.py
Normal file
28
GPy/plotting/matplot_dep/inference_plots.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue