From afa0b4191677b57703c9b06619d9aa5674ff33c9 Mon Sep 17 00:00:00 2001 From: dsquareindia Date: Thu, 30 Jun 2016 00:19:13 +0530 Subject: [PATCH] use random_state instead of seed. --- gensim/test/test_coherencemodel.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gensim/test/test_coherencemodel.py b/gensim/test/test_coherencemodel.py index 9291d33825..dba74bc9b4 100644 --- a/gensim/test/test_coherencemodel.py +++ b/gensim/test/test_coherencemodel.py @@ -45,9 +45,8 @@ def testfile(): class TestCoherenceModel(unittest.TestCase): def setUp(self): - np.random.seed(8) - self.badLdaModel = LdaModel(corpus=corpus, num_topics=2, passes=1) # Bad lda model - self.goodLdaModel = LdaModel(corpus=corpus, num_topics=2, passes=50) # Good lda model + self.badLdaModel = LdaModel(corpus=corpus, num_topics=2, passes=1, random_state=17) # Bad lda model + self.goodLdaModel = LdaModel(corpus=corpus, num_topics=2, passes=50, random_state=17) # Good lda model def testUMassLdaModel(self): """Test U_Mass topic coherence algorithm on LDA Model"""