GPy.testing package¶
Submodules¶
GPy.testing.examples_tests module¶
GPy.testing.fitc module¶
GPy.testing.index_operations_tests module¶
GPy.testing.inference_tests module¶
The test cases for various inference algorithms
GPy.testing.kernel_tests module¶
-
class
GPy.testing.kernel_tests.Coregionalize_weave_test(methodName='runTest')[source]¶ Bases:
unittest.case.TestCaseMake sure that the coregionalize kernel work with and without weave enabled
-
class
GPy.testing.kernel_tests.Kern_check_dK_dX(kernel=None, dL_dK=None, X=None, X2=None)[source]¶ Bases:
GPy.testing.kernel_tests.Kern_check_modelThis class allows gradient checks for the gradient of a kernel with respect to X.
-
class
GPy.testing.kernel_tests.Kern_check_dK_dtheta(kernel=None, dL_dK=None, X=None, X2=None)[source]¶ Bases:
GPy.testing.kernel_tests.Kern_check_modelThis class allows gradient checks for the gradient of a kernel with respect to parameters.
-
class
GPy.testing.kernel_tests.Kern_check_dKdiag_dX(kernel=None, dL_dK=None, X=None, X2=None)[source]¶ Bases:
GPy.testing.kernel_tests.Kern_check_dK_dXThis class allows gradient checks for the gradient of a kernel diagonal with respect to X.
-
class
GPy.testing.kernel_tests.Kern_check_dKdiag_dtheta(kernel=None, dL_dK=None, X=None)[source]¶ Bases:
GPy.testing.kernel_tests.Kern_check_modelThis class allows gradient checks of the gradient of the diagonal of a kernel with respect to the parameters.
-
class
GPy.testing.kernel_tests.Kern_check_model(kernel=None, dL_dK=None, X=None, X2=None)[source]¶ Bases:
GPy.core.model.ModelThis is a dummy model class used as a base class for checking that the gradients of a given kernel are implemented correctly. It enables checkgrad() to be called independently on a kernel.
-
class
GPy.testing.kernel_tests.KernelGradientTestsContinuous(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
GPy.testing.kernel_tests.KernelTestsMiscellaneous(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
GPy.testing.kernel_tests.KernelTestsNonContinuous(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
GPy.testing.kernel_tests.check_kernel_gradient_functions(kern, X=None, X2=None, output_ind=None, verbose=False, fixed_X_dims=None)[source]¶ This function runs on kernels to check the correctness of their implementation. It checks that the covariance function is positive definite for a randomly generated data set.
Parameters: - kern (GPy.kern.Kernpart) – the kernel to be tested.
- X (ndarray) – X input values to test the covariance function.
- X2 (ndarray) – X2 input values to test the covariance function.
GPy.testing.likelihood_tests module¶
-
class
GPy.testing.likelihood_tests.LaplaceTests(methodName='runTest')[source]¶ Bases:
unittest.case.TestCaseSpecific likelihood tests, not general enough for the above tests
-
GPy.testing.likelihood_tests.dparam_checkgrad(func, dfunc, params, params_names, args, constraints=None, randomize=False, verbose=False)[source]¶ checkgrad expects a f: R^N -> R^1 and df: R^N -> R^N However if we are holding other parameters fixed and moving something else We need to check the gradient of each of the fixed parameters (f and y for example) seperately, whilst moving another parameter. Otherwise f: gives back R^N and
df: gives back R^NxM where M isThe number of parameters and N is the number of data Need to take a slice out from f and a slice out of df
-
GPy.testing.likelihood_tests.dparam_partial(inst_func, *args)[source]¶ If we have a instance method that needs to be called but that doesn’t take the parameter we wish to change to checkgrad, then this function will change the variable using set params.
- inst_func: should be a instance function of an object that we would like
- to change
param: the param that will be given to set_params args: anything else that needs to be given to the function (for example
the f or Y that are being used in the function whilst we tweak the param
GPy.testing.model_tests module¶
-
class
GPy.testing.model_tests.GradientTests(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase-
test_GPRegression_exponential_1D()[source]¶ Testing the GP regression with exponential kernel on 1d data
-
test_GPRegression_exponential_2D()[source]¶ Testing the GP regression with exponential kernel on 2d data
-
test_GPRegression_exponential_ARD_2D()[source]¶ Testing the GP regression with exponential kernel on 2d data
-
test_GPRegression_linear_kern_1D_ARD()[source]¶ Testing the GP regression with linear kernel on 1d data
-
test_GPRegression_linear_kern_2D_ARD()[source]¶ Testing the GP regression with linear kernel on 2d data
-
test_GPRegression_matern32_ARD_2D()[source]¶ Testing the GP regression with matern32 kernel on 2d data
-
test_GPRegression_matern52_ARD_2D()[source]¶ Testing the GP regression with matern52 kernel on 2d data
-
test_GPRegression_mlp_1d()[source]¶ Testing the GP regression with mlp kernel with white kernel on 1d data
-
test_GPRegression_rbf_1d()[source]¶ Testing the GP regression with rbf kernel with white kernel on 1d data
-
test_SparseGPRegression_rbf_linear_white_kern_1D()[source]¶ Testing the sparse GP regression with rbf kernel on 2d data
-
test_SparseGPRegression_rbf_linear_white_kern_1D_uncertain_inputs()[source]¶ Testing the sparse GP regression with rbf, linear kernel on 1d data with uncertain inputs
-
test_SparseGPRegression_rbf_linear_white_kern_2D()[source]¶ Testing the sparse GP regression with rbf kernel on 2d data
-
test_SparseGPRegression_rbf_linear_white_kern_2D_uncertain_inputs()[source]¶ Testing the sparse GP regression with rbf, linear kernel on 2d data with uncertain inputs
-
test_SparseGPRegression_rbf_white_kern_1d()[source]¶ Testing the sparse GP regression with rbf kernel with white kernel on 1d data
-
GPy.testing.observable_tests module¶
-
class
GPy.testing.observable_tests.ParamTestParent(name=None, parameters=[], *a, **kw)[source]¶ Bases:
GPy.core.parameterization.parameterized.Parameterized-
parent_changed_count= -1¶
-
-
class
GPy.testing.observable_tests.ParameterizedTest(name=None, parameters=[], *a, **kw)[source]¶ Bases:
GPy.core.parameterization.parameterized.Parameterized-
params_changed_count= -1¶
-
GPy.testing.parameterized_tests module¶
Created on Feb 13, 2014
@author: maxzwiessele
-
class
GPy.testing.parameterized_tests.ArrayCoreTest(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
GPy.testing.pickle_tests module¶
Created on 13 Mar 2014
@author: maxz
-
class
GPy.testing.pickle_tests.ListDictTestCase(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
GPy.testing.pickle_tests.Test(methodName='runTest')[source]¶ Bases:
GPy.testing.pickle_tests.ListDictTestCase-
test_add_observer(test_item)¶
-