mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-21 14:05:14 +02:00
merged last devel
This commit is contained in:
commit
45f692340a
170 changed files with 39094 additions and 4107 deletions
26
GPy/examples/state_space.py
Normal file
26
GPy/examples/state_space.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import GPy
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
import GPy.models.state_space_model as SS_model
|
||||
|
||||
X = np.linspace(0, 10, 2000)[:, None]
|
||||
Y = np.sin(X) + np.random.randn(*X.shape)*0.1
|
||||
|
||||
kernel1 = GPy.kern.Matern32(X.shape[1])
|
||||
m1 = GPy.models.GPRegression(X,Y, kernel1)
|
||||
|
||||
print m1
|
||||
m1.optimize(optimizer='bfgs',messages=True)
|
||||
|
||||
print m1
|
||||
|
||||
kernel2 = GPy.kern.sde_Matern32(X.shape[1])
|
||||
#m2 = SS_model.StateSpace(X,Y, kernel2)
|
||||
m2 = GPy.models.StateSpace(X,Y, kernel2)
|
||||
print m2
|
||||
|
||||
m2.optimize(optimizer='bfgs',messages=True)
|
||||
|
||||
print m2
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue