Github user rotationsymmetry commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7785#discussion_r35914934
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAModel.scala ---
    @@ -561,6 +561,20 @@ class DistributedLDAModel private[clustering] (
         
JavaPairRDD.fromRDD(topicDistributions.asInstanceOf[RDD[(java.lang.Long, 
Vector)]])
       }
     
    +  /**
    +   * For each document, return the top k weighted topics for that document 
and their weights.
    +   * @return RDD of (doc ID, topic indices, topic weights)
    +   */
    +  def topTopicsPerDocument(k: Int): RDD[(Long, Array[Int], Array[Double])] 
= {
    +    graph.vertices.filter(LDA.isDocumentVertex).map { case (docID, 
topicCounts) =>
    --- End diff --
    
    We have `import LDA._` on line 417. So I think we don't need to put `LDA.` 
for `isDocumentVertex`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to