Skip to content
Closed
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
6 changes: 6 additions & 0 deletions python/pyspark/mllib/clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,12 @@ def describeTopics(self, maxTermsPerTopic=None):
"""Return the topics described by weighted terms.

WARNING: If vocabSize and k are large, this can return a large object!

:param maxTermsPerTopic: Maximum number of terms to collect for each topic.
(default: vocabulary size)
:return: Array over topics. Each topic is represented as a pair of matching arrays:
(term indices, term weights in topic).
Each topic's terms are sorted in order of decreasing weight.
"""
if maxTermsPerTopic is None:
topics = self.call("describeTopics")
Expand Down