8000 [MRG] Change deprecation warning for doc_topic_distr from future to present… by garyForeman · Pull Request #8146 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG] Change deprecation warning for doc_topic_distr from future to present… #8146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions sklearn/decomposition/online_lda.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 deprecated and is ignored
because user no longer has access to unnormalized distribution

Parameters
----------
Expand All @@ -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 currently being ignored.

.. deprecated:: 0.19

Expand All @@ -773,8 +773,9 @@ 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 "
"will be removed in 0.21.", DeprecationWarning)
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)
0