49a385eae93032125a6718433b3ca1753aee3b1e,testing/test_method_equivalence.py,TestEquivalence,test_all,#TestEquivalence#,87

Before Change



    def test_all(self):
        with self.test_context():
            likelihoods = np.array([
                -m._objective(m.get_free_state())[0].squeeze()
                for m in self.models])
            self.assertTrue(np.allclose(likelihoods, likelihoods[0], 1e-6))
            variances, lengthscales = [], []
            for m in self.models:
                if hasattr(m.kern, "rbf"):

After Change



    def test_all(self):
        with self.test_context():
            likelihoods = []
            for m in self.models:
                m.compile()
                opt = gpflow.train.ScipyOptimizer()
                opt.minimize(m, maxiter=300)
                neg_obj = tf.negative(m.objective)
                likelihoods.append(m.session.run(neg_obj).squeeze())
            assert_allclose(likelihoods, likelihoods[0], rtol=1e-6)
            variances, lengthscales = [], []
            for m in self.models:
                if hasattr(m.kern, "rbf"):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 12

Instances


Project Name: GPflow/GPflow
Commit Name: 49a385eae93032125a6718433b3ca1753aee3b1e
Time: 2017-11-02
Author: art.art.v@gmail.com
File Name: testing/test_method_equivalence.py
Class Name: TestEquivalence
Method Name: test_all


Project Name: has2k1/plotnine
Commit Name: 21d7042c38a23d4cfe6278ddd5fa1c247af4e376
Time: 2016-07-11
Author: has2k1@gmail.com
File Name: ggplot/stats/stat_density.py
Class Name:
Method Name: compute_density


Project Name: kengz/SLM-Lab
Commit Name: 2381a50a70559340a0335288d648b4bb9a675588
Time: 2018-06-12
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/dqn.py
Class Name: MultitaskDQN
Method Name: act


Project Name: WZBSocialScienceCenter/tmtoolkit
Commit Name: 08633bd190028ad3cbe4c13b352b9efeae90f17e
Time: 2019-03-22
Author: markus.konrad@wzb.eu
File Name: tmtoolkit/topicmod/tm_gensim.py
Class Name: MultiprocEvaluationWorkerGensim
Method Name: fit_model