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

    https://github.com/apache/spark/pull/4807#discussion_r26186996
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/clustering/LDA.scala 
---
    @@ -311,165 +319,319 @@ private[clustering] object LDA {
     
       private[clustering] type TokenCount = Double
     
    -  /** Term vertex IDs are {-1, -2, ..., -vocabSize} */
    -  private[clustering] def term2index(term: Int): Long = -(1 + term.toLong)
     
    -  private[clustering] def index2term(termIndex: Long): Int = -(1 + 
termIndex).toInt
     
    -  private[clustering] def isDocumentVertex(v: (VertexId, _)): Boolean = 
v._1 >= 0
    +  object LearningAlgorithms extends Enumeration {
    +    type Algorithm = Value
    +    val Gibbs, EM = Value
    +  }
     
    -  private[clustering] def isTermVertex(v: (VertexId, _)): Boolean = v._1 < 0
    +  private[clustering] trait LearningState {
    +    def next(): LearningState
    +    def topicsMatrix: Matrix
    +    def describeTopics(maxTermsPerTopic: Int): Array[(Array[Int], 
Array[Double])]
    --- End diff --
    
    This is not necessary, right? Should be removed from the `LearningState` 
class.



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to