8000 fix joblib error in LatentDirichletAllocation · mannby/scikit-learn@cee87e1 · GitHub
[go: up one dir, main page]

Skip to content

Commit cee87e1

Browse files
chyikweiClaes-Fredrik Mannby
authored andcommitted
fix joblib error in LatentDirichletAllocation
1 parent da199e3 commit cee87e1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

sklearn/decomposition/online_lda.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,8 @@ def fit(self, X, y=None):
520520
# check perplexity
521521
if evaluate_every > 0 and (i + 1) % evaluate_every == 0:
522522
doc_topics_distr, _ = self._e_step(X, cal_sstats=False,
523-
random_init=False)
523+
random_init=False,
524+
parallel=parallel)
524525
bound = self.perplexity(X, doc_topics_distr,
525526
sub_sampling=False)
526527
if self.verbose:

sklearn/decomposition/tests/test_online_lda.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ def test_lda_multi_jobs():
199199
rng = np.random.RandomState(0)
200200
lda = LatentDirichletAllocation(n_topics=n_topics, n_jobs=2,
201201
learning_method=method,
202+
evaluate_every=1,
202203
random_state=rng)
203204
lda.fit(X)
204205

0 commit comments

Comments
 (0)
0