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

    https://github.com/apache/spark/pull/12176#discussion_r58553918
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAOptimizer.scala ---
    @@ -542,10 +539,11 @@ private[clustering] object OnlineLDAOptimizer {
           expElogbeta: BDM[Double],
           alpha: breeze.linalg.Vector[Double],
           gammaShape: Double,
    -      k: Int): (BDV[Double], BDM[Double]) = {
    -    val (ids: List[Int], cts: Array[Double]) = termCounts match {
    -      case v: DenseVector => ((0 until v.size).toList, v.values)
    -      case v: SparseVector => (v.indices.toList, v.values)
    +      k: Int,
    +      ids: List[Int]): (BDV[Double], BDM[Double]) = {
    +    val cts: Array[Double] = termCounts match {
    --- End diff --
    
    Yes it looks redundant, but `values` is not a member of parent trait 
`Vector`, it is defined at individual implementation level (i.e.  `DenseVector` 
and `SparseVector`). 


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