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

    https://github.com/apache/spark/pull/7064#discussion_r33419654
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAOptimizer.scala ---
    @@ -119,6 +119,18 @@ final class EMLDAOptimizer extends LDAOptimizer {
           }
         }
     
    +    // create term vertices for empty docs
    +    val emptyDocTermVertices: RDD[(VertexId, TopicCounts)] = {
    +      //empty documents
    +      val emptyDocs = docs.filter { case (d: Long, tc: Vector) =>
    +        tc.toBreeze.reduce(_+_) != BDV(0.0)
    --- End diff --
    
    agree! in between I realize I had bug with != . it should be == . Since we 
want empty docs and hence the norm has to be zero.


---
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