mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-24 14:15:14 +02:00
manual merging
This commit is contained in:
commit
a6eae08934
48 changed files with 1907 additions and 1082 deletions
|
|
@ -30,7 +30,7 @@ def student_t_approx(optimize=True, plot=True):
|
|||
#Yc = Yc/Yc.max()
|
||||
|
||||
#Add student t random noise to datapoints
|
||||
deg_free = 5
|
||||
deg_free = 1
|
||||
print "Real noise: ", real_std
|
||||
initial_var_guess = 0.5
|
||||
edited_real_sd = initial_var_guess
|
||||
|
|
@ -47,9 +47,9 @@ def student_t_approx(optimize=True, plot=True):
|
|||
m1['.*white'].constrain_fixed(1e-5)
|
||||
m1.randomize()
|
||||
|
||||
##Gaussian GP model on corrupt data
|
||||
#Gaussian GP model on corrupt data
|
||||
m2 = GPy.models.GPRegression(X, Yc.copy(), kernel=kernel2)
|
||||
m1['.*white'].constrain_fixed(1e-5)
|
||||
m2['.*white'].constrain_fixed(1e-5)
|
||||
m2.randomize()
|
||||
|
||||
#Student t GP model on clean data
|
||||
|
|
@ -59,10 +59,6 @@ def student_t_approx(optimize=True, plot=True):
|
|||
m3['.*t_noise'].constrain_bounded(1e-6, 10.)
|
||||
m3['.*white'].constrain_fixed(1e-5)
|
||||
m3.randomize()
|
||||
debug = True
|
||||
|
||||
#TODO: remove
|
||||
return m3
|
||||
|
||||
#Student t GP model on corrupt data
|
||||
t_distribution = GPy.likelihoods.StudentT(deg_free=deg_free, sigma2=edited_real_sd)
|
||||
|
|
@ -71,6 +67,16 @@ def student_t_approx(optimize=True, plot=True):
|
|||
m4['.*t_noise'].constrain_bounded(1e-6, 10.)
|
||||
m4['.*white'].constrain_fixed(1e-5)
|
||||
m4.randomize()
|
||||
print m4
|
||||
debug=True
|
||||
if debug:
|
||||
m4.optimize(messages=1)
|
||||
import pylab as pb
|
||||
pb.plot(m4.X, m4.inference_method.f_hat)
|
||||
pb.plot(m4.X, m4.Y, 'rx')
|
||||
m4.plot()
|
||||
print m4
|
||||
return m4
|
||||
|
||||
if optimize:
|
||||
optimizer='scg'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue