mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-03 00:32:39 +02:00
Merge branch 'devel' of https://github.com/SheffieldML/GPy into gradientsxx
This commit is contained in:
commit
5c0c1d4c3d
6 changed files with 71 additions and 9 deletions
|
|
@ -2,11 +2,14 @@
|
|||
# Licensed under the BSD 3-clause license (see LICENSE.txt)
|
||||
|
||||
import unittest
|
||||
import numpy as np
|
||||
from unittest.case import skip
|
||||
|
||||
import GPy
|
||||
from GPy.core.parameterization.param import Param
|
||||
import numpy as np
|
||||
|
||||
from ..util.config import config
|
||||
from unittest.case import skip
|
||||
|
||||
|
||||
verbose = 0
|
||||
|
||||
|
|
@ -402,6 +405,15 @@ class KernelGradientTestsContinuous(unittest.TestCase):
|
|||
k.randomize()
|
||||
self.assertTrue(check_kernel_gradient_functions(k, X=self.X, X2=self.X2, verbose=verbose))
|
||||
|
||||
def test_Precomputed(self):
|
||||
Xall = np.concatenate([self.X, self.X2])
|
||||
cov = np.dot(Xall, Xall.T)
|
||||
X = np.arange(self.N).reshape(1,self.N)
|
||||
X2 = np.arange(self.N,2*self.N+10).reshape(1,self.N+10)
|
||||
k = GPy.kern.Precomputed(1, cov)
|
||||
k.randomize()
|
||||
self.assertTrue(check_kernel_gradient_functions(k, X=X, X2=X2, verbose=verbose))
|
||||
|
||||
class KernelTestsMiscellaneous(unittest.TestCase):
|
||||
def setUp(self):
|
||||
N, D = 100, 10
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue