a9a2a58840f209c4282f8595bdd7cfcc5540ab2e,testing/test_conditionals.py,DiagsTest,test_nonwhiten,#DiagsTest#,52

Before Change


            Fstar_mean_1, Fstar_var_1 = GPflow.conditionals.gaussian_gp_predict(self.Xs, self.X, self.k, self.mu, self.sqrt)
            Fstar_mean_2, Fstar_var_2 = GPflow.conditionals.gaussian_gp_predict(self.Xs, self.X, self.k, self.mu, self.chol)
            
        mean_diff = theano.function([self.X, self.Xs, self.mu, self.sqrt, self.free_x],
                                Fstar_mean_1 - Fstar_mean_2, on_unused_input="ignore")(
                                        self.X_data, self.Xs_data, self.mu_data, self.sqrt_data, self.free_x_data)

        var_diff = theano.function([self.X, self.Xs, self.mu, self.sqrt, self.free_x],
                                Fstar_var_1 - Fstar_var_2, on_unused_input="ignore")(
                                        self.X_data, self.Xs_data, self.mu_data, self.sqrt_data, self.free_x_data)

        self.failUnless(np.allclose(mean_diff, 0))
        self.failUnless(np.allclose(var_diff, 0))

After Change


        self.failUnless(np.allclose(var_diff, 0))


    def test_nonwhiten(self):
        with self.k.tf_mode():
            Fstar_mean_1, Fstar_var_1 = GPflow.conditionals.gaussian_gp_predict(self.Xs, self.X, self.k, self.mu, self.sqrt)
            Fstar_mean_2, Fstar_var_2 = GPflow.conditionals.gaussian_gp_predict(self.Xs, self.X, self.k, self.mu, self.chol)
            
        mean_diff = tf.Session().run(Fstar_mean_1 - Fstar_mean_2, feed_dict=self.feed_dict)
        var_diff = tf.Session().run(Fstar_var_1 - Fstar_var_2, feed_dict=self.feed_dict)

        self.failUnless(np.allclose(mean_diff, 0))
        self.failUnless(np.allclose(var_diff, 0))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 23

Instances


Project Name: GPflow/GPflow
Commit Name: a9a2a58840f209c4282f8595bdd7cfcc5540ab2e
Time: 2016-01-18
Author: james.hensman@gmail.com
File Name: testing/test_conditionals.py
Class Name: DiagsTest
Method Name: test_nonwhiten


Project Name: GPflow/GPflow
Commit Name: a9a2a58840f209c4282f8595bdd7cfcc5540ab2e
Time: 2016-01-18
Author: james.hensman@gmail.com
File Name: testing/test_conditionals.py
Class Name: DiagsTest
Method Name: test_whiten


Project Name: GPflow/GPflow
Commit Name: a9a2a58840f209c4282f8595bdd7cfcc5540ab2e
Time: 2016-01-18
Author: james.hensman@gmail.com
File Name: testing/test_conditionals.py
Class Name: DiagsTest
Method Name: test_nonwhiten


Project Name: GPflow/GPflow
Commit Name: a9a2a58840f209c4282f8595bdd7cfcc5540ab2e
Time: 2016-01-18
Author: james.hensman@gmail.com
File Name: testing/test_conditionals.py
Class Name: WhitenTest
Method Name: test_whiten