mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-04-29 06:46:22 +02:00
minor changes to the apsre regression demo
This commit is contained in:
parent
0fb8ab91bb
commit
eb3061a9f0
1 changed files with 1 additions and 9 deletions
|
|
@ -11,7 +11,7 @@ import numpy as np
|
|||
import GPy
|
||||
np.random.seed(2)
|
||||
pb.ion()
|
||||
N = 1200
|
||||
N = 400
|
||||
M = 5
|
||||
|
||||
######################################
|
||||
|
|
@ -29,19 +29,11 @@ kernel = rbf + noise
|
|||
# create simple GP model
|
||||
m = GPy.models.sparse_GP_regression(X, Y, kernel, M=M)
|
||||
|
||||
# contrain all parameters to be positive
|
||||
m.constrain_positive('(variance|lengthscale|precision)')
|
||||
#m.constrain_positive('(variance|lengthscale)')
|
||||
#m.constrain_fixed('prec',10.)
|
||||
|
||||
|
||||
#check gradient FIXME unit test please
|
||||
m.checkgrad(verbose=1)
|
||||
stop
|
||||
# optimize and plot
|
||||
m.optimize('tnc', messages = 1)
|
||||
m.plot()
|
||||
# print(m)
|
||||
|
||||
######################################
|
||||
## 2 dimensional example
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue