<s> import unittest <EOL> import numpy as np <EOL> import GPy <EOL> class FITCtest ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> N = <NUM_LIT:20> <EOL> self . X1D = np . random . uniform ( - <NUM_LIT> , <NUM_LIT> , ( N , <NUM_LIT:1> ) ) <EOL> self . Y1D = np . sin ( self . X1D ) + np . random . randn ( N , <NUM_LIT:1> ) * <NUM_LIT> <EOL> self . X2D = np . random . uniform ( - <NUM_LIT> , <NUM_LIT> , ( N , <NUM_LIT:2> ) ) <EOL> self . Y2D = np . sin ( self . X2D [ : , <NUM_LIT:0> : <NUM_LIT:1> ] ) * np . sin ( self . X2D [ : , <NUM_LIT:1> : <NUM_LIT:2> ] ) + np . random . randn ( N , <NUM_LIT:1> ) * <NUM_LIT> <EOL> def test_fitc_1d ( self ) : <EOL> m = GPy . models . SparseGPRegression ( self . X1D , self . Y1D ) <EOL> m . inference_method = GPy . inference . latent_function_inference . FITC ( ) <EOL> self . assertTrue ( m . checkgrad ( ) ) <EOL> def test_fitc_2d ( self ) : <EOL> m = GPy . models . SparseGPRegression ( self . X2D , self . Y2D ) <EOL> m . inference_method = GPy . inference . latent_function_inference . FITC ( ) <EOL> self . assertTrue ( m . checkgrad ( ) ) </s>
