From f6f18649c1e8769c2c2a98c744c0993d2ed14b02 Mon Sep 17 00:00:00 2001 From: Gary Foreman Date: Mon, 2 Jan 2017 16:51:11 -0600 Subject: [PATCH 1/3] Change deprecation warning for doc_topic_distr from future to present tense --- sklearn/decomposition/online_lda.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sklearn/decomposition/online_lda.py b/sklearn/decomposition/online_lda.py index 8e0c5bfe6b415..b90775767b5ff 100644 --- a/sklearn/decomposition/online_lda.py +++ b/sklearn/decomposition/online_lda.py @@ -773,8 +773,8 @@ def perplexity(self, X, doc_topic_distr='deprecated', sub_sampling=False): Perplexity score. """ if doc_topic_distr != 'deprecated': - warnings.warn("Argument 'doc_topic_distr' is deprecated and will " - "be ignored as of 0.19. Support for this argument " + warnings.warn("Argument 'doc_topic_distr' is deprecated and is " + "being ignored as of 0.19. Support for this argument " "will be removed in 0.21.", DeprecationWarning) return self._perplexity_precomp_distr(X, sub_sampling=sub_sampling) From 1c1c4529d4b3fba66aeb5b79ef777b425e391c60 Mon Sep 17 00:00:00 2001 From: Gary Foreman Date: Mon, 2 Jan 2017 17:15:12 -0600 Subject: [PATCH 2/3] Indicate that doc_topic_distr is ignored in the perplexity docstring --- sklearn/decomposition/online_lda.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sklearn/decomposition/online_lda.py b/sklearn/decomposition/online_lda.py index b90775767b5ff..51332a9dcf3bc 100644 --- a/sklearn/decomposition/online_lda.py +++ b/sklearn/decomposition/online_lda.py @@ -753,8 +753,8 @@ def perplexity(self, X, doc_topic_distr='deprecated', sub_sampling=False): Perplexity is defined as exp(-1. * log-likelihood per word) .. versionchanged:: 0.19 - *doc_topic_distr* argument has been depricated because user no - longer has access to unnormalized distribution + *doc_topic_distr* argument has been depricated and is ignored + because user no longer has access to unnormalized distribution Parameters ---------- @@ -763,7 +763,7 @@ def perplexity(self, X, doc_topic_distr='deprecated', sub_sampling=False): doc_topic_distr : None or array, shape=(n_samples, n_topics) Document topic distribution. - If it is None, it will be generated by applying transform on X. + This argument is deprecated and is currenly being ignored. .. deprecated:: 0.19 @@ -774,7 +774,8 @@ def perplexity(self, X, doc_topic_distr='deprecated', sub_sampling=False): """ if doc_topic_distr != 'deprecated': warnings.warn("Argument 'doc_topic_distr' is deprecated and is " - "being ignored as of 0.19. Support for this argument " - "will be removed in 0.21.", DeprecationWarning) + "being ignored as of 0.19. Support for this " + "argument will be removed in 0.21.", + DeprecationWarning) return self._perplexity_precomp_distr(X, sub_sampling=sub_sampling) From 5790307ae62741579f16ff1386d9a87dfe1245c9 Mon Sep 17 00:00:00 2001 From: Gary Foreman Date: Mon, 2 Jan 2017 18:02:01 -0600 Subject: [PATCH 3/3] Fix spelling errors --- sklearn/decomposition/online_lda.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sklearn/decomposition/online_lda.py b/sklearn/decomposition/online_lda.py index 51332a9dcf3bc..46a64a86a0cbf 100644 --- a/sklearn/decomposition/online_lda.py +++ b/sklearn/decomposition/online_lda.py @@ -753,7 +753,7 @@ def perplexity(self, X, doc_topic_distr='deprecated', sub_sampling=False): Perplexity is defined as exp(-1. * log-likelihood per word) .. versionchanged:: 0.19 - *doc_topic_distr* argument has been depricated and is ignored + *doc_topic_distr* argument has been deprecated and is ignored because user no longer has access to unnormalized distribution Parameters @@ -763,7 +763,7 @@ def perplexity(self, X, doc_topic_distr='deprecated', sub_sampling=False): doc_topic_distr : None or array, shape=(n_samples, n_topics) Document topic distribution. - This argument is deprecated and is currenly being ignored. + This argument is deprecated and is currently being ignored. .. deprecated:: 0.19