mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-05 17:52:39 +02:00
[merge] devel changes to regression objects
This commit is contained in:
commit
942c134ab7
4 changed files with 11 additions and 6 deletions
|
|
@ -22,7 +22,7 @@ class Test(unittest.TestCase):
|
|||
|
||||
def test_setxy_bgplvm(self):
|
||||
k = GPy.kern.RBF(1)
|
||||
m = GPy.models.BayesianGPLVM(self.Y, 2, kernel=k)
|
||||
m = GPy.models.BayesianGPLVM(self.Y, 1, kernel=k)
|
||||
mu, var = m.predict(m.X)
|
||||
X = m.X.copy()
|
||||
Xnew = NormalPosterior(m.X.mean[:10].copy(), m.X.variance[:10].copy())
|
||||
|
|
@ -32,10 +32,11 @@ class Test(unittest.TestCase):
|
|||
mu2, var2 = m.predict(m.X)
|
||||
np.testing.assert_allclose(mu, mu2)
|
||||
np.testing.assert_allclose(var, var2)
|
||||
|
||||
|
||||
def test_setxy_gplvm(self):
|
||||
k = GPy.kern.RBF(1)
|
||||
m = GPy.models.GPLVM(self.Y, 2, kernel=k)
|
||||
m = GPy.models.GPLVM(self.Y, 1, kernel=k)
|
||||
mu, var = m.predict(m.X)
|
||||
X = m.X.copy()
|
||||
Xnew = X[:10].copy()
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import tempfile
|
|||
from GPy.examples.dimensionality_reduction import mrd_simulation
|
||||
from GPy.core.parameterization.variational import NormalPosterior
|
||||
from GPy.models.gp_regression import GPRegression
|
||||
from functools import reduce
|
||||
import GPy
|
||||
from nose import SkipTest
|
||||
|
||||
def toy_model():
|
||||
|
|
@ -33,7 +33,7 @@ class ListDictTestCase(unittest.TestCase):
|
|||
class Test(ListDictTestCase):
|
||||
@SkipTest
|
||||
def test_load_pickle(self):
|
||||
import os, GPy
|
||||
import os
|
||||
m = GPy.load(os.path.join(os.path.abspath(os.path.split(__file__)[0]), 'pickle_test.pickle'))
|
||||
self.assertTrue(m.checkgrad())
|
||||
self.assertEqual(m.log_likelihood(), -4.7351019830022087)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue