f990d4612c19b6f87f7d3539d0e4de7845dda3f7,testing/test_conditionals.py,WhitenTest,setUp,#WhitenTest#,78

Before Change



class WhitenTest(GPflowTestCase):
    def setUp(self):
        tf.reset_default_graph()
        self.k = GPflow.kernels.Matern32(1) + GPflow.kernels.White(1)
        self.k.white.variance = 0.01
        self.num_data = 10
        self.num_test_data = 100

After Change



class WhitenTest(GPflowTestCase):
    def setUp(self):
        with self.test_session():
            self.k = GPflow.kernels.Matern32(1) + GPflow.kernels.White(1)
            self.k.white.variance = 0.01
            self.num_data = 10
            self.num_test_data = 100
            self.X = tf.placeholder(float_type, [self.num_data, 1])
            self.F = tf.placeholder(float_type, [self.num_data, 1])
            self.Xs = tf.placeholder(float_type, [self.num_test_data, 1])

            //make tf array shenanigans
            self.free_x = tf.placeholder(float_type)
            self.k.make_tf_array(self.free_x)

            self.free_x_data = self.k.get_free_state()
            // NB. with too many random data, numerics suffer
            self.rng = np.random.RandomState(0)
            self.X_data = self.rng.randn(self.num_data, 1)
            self.F_data = self.rng.randn(self.num_data, 1)
            self.Xs_data = self.rng.randn(self.num_test_data,1)

            self.feed_dict = {
                    self.free_x:self.free_x_data,
                    self.X:self.X_data,
                    self.F:self.F_data,
                    self.Xs:self.Xs_data}

    def test_whiten(self):
        
        make sure that predicting using the whitened representation is the
        sameas the non-whitened one.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 14

Non-data size: 3

Instances


Project Name: GPflow/GPflow
Commit Name: f990d4612c19b6f87f7d3539d0e4de7845dda3f7
Time: 2017-08-17
Author: art.art.v@gmail.com
File Name: testing/test_conditionals.py
Class Name: WhitenTest
Method Name: setUp


Project Name: GPflow/GPflowOpt
Commit Name: 6b2c2e294daecdcc2d46205c7b99d3dc3ef3553c
Time: 2017-08-30
Author: joachim.vanderherten@ugent.be
File Name: testing/test_transforms.py
Class Name: LinearTransformTests
Method Name: test_backward_variance_full_cov


Project Name: GPflow/GPflow
Commit Name: f990d4612c19b6f87f7d3539d0e4de7845dda3f7
Time: 2017-08-17
Author: art.art.v@gmail.com
File Name: testing/test_autoflow.py
Class Name: TestNoArgs
Method Name: setUp


Project Name: GPflow/GPflow
Commit Name: f990d4612c19b6f87f7d3539d0e4de7845dda3f7
Time: 2017-08-17
Author: art.art.v@gmail.com
File Name: testing/test_conditionals.py
Class Name: WhitenTestGaussian
Method Name: setUp


Project Name: GPflow/GPflow
Commit Name: f990d4612c19b6f87f7d3539d0e4de7845dda3f7
Time: 2017-08-17
Author: art.art.v@gmail.com
File Name: testing/test_conditionals.py
Class Name: DiagsTest
Method Name: setUp


Project Name: GPflow/GPflowOpt
Commit Name: 6b2c2e294daecdcc2d46205c7b99d3dc3ef3553c
Time: 2017-08-30
Author: joachim.vanderherten@ugent.be
File Name: testing/test_transforms.py
Class Name: LinearTransformTests
Method Name: test_backward_variance


Project Name: GPflow/GPflow
Commit Name: f990d4612c19b6f87f7d3539d0e4de7845dda3f7
Time: 2017-08-17
Author: art.art.v@gmail.com
File Name: testing/test_autoflow.py
Class Name: TestAdd
Method Name: setUp


Project Name: GPflow/GPflow
Commit Name: f990d4612c19b6f87f7d3539d0e4de7845dda3f7
Time: 2017-08-17
Author: art.art.v@gmail.com
File Name: testing/test_data_object.py
Class Name: TestDataHolderModels
Method Name: setUp


Project Name: GPflow/GPflow
Commit Name: f990d4612c19b6f87f7d3539d0e4de7845dda3f7
Time: 2017-08-17
Author: art.art.v@gmail.com
File Name: testing/test_ekerns.py
Class Name: TestKernExpQuadrature
Method Name: test_exKxz


Project Name: GPflow/GPflow
Commit Name: 9d7e5078cdd0a4a723c833929a2a3fe8531841d9
Time: 2017-08-17
Author: art.art.v@gmail.com
File Name: testing/test_autoflow.py
Class Name: TestAutoFlowSessionGraphArguments
Method Name: test_autoflow_results


Project Name: GPflow/GPflow
Commit Name: f990d4612c19b6f87f7d3539d0e4de7845dda3f7
Time: 2017-08-17
Author: art.art.v@gmail.com
File Name: testing/test_ekerns.py
Class Name: TestKernExpQuadrature
Method Name: setUp


Project Name: GPflow/GPflow
Commit Name: f990d4612c19b6f87f7d3539d0e4de7845dda3f7
Time: 2017-08-17
Author: art.art.v@gmail.com
File Name: testing/test_autoflow.py
Class Name: TestShareArgs
Method Name: setUp


Project Name: GPflow/GPflow
Commit Name: f990d4612c19b6f87f7d3539d0e4de7845dda3f7
Time: 2017-08-17
Author: art.art.v@gmail.com
File Name: testing/test_coregion.py
Class Name: TestEquivalence
Method Name: setUp


Project Name: GPflow/GPflow
Commit Name: f990d4612c19b6f87f7d3539d0e4de7845dda3f7
Time: 2017-08-17
Author: art.art.v@gmail.com
File Name: testing/test_autoflow.py
Class Name: TestDataHolder
Method Name: setUp