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

    https://github.com/apache/spark/pull/4301#discussion_r23976829
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/clustering/PowerIterationClustering.scala
 ---
    @@ -149,6 +165,18 @@ private[clustering] object PowerIterationClustering 
extends Logging {
       }
     
       /**
    +   * Generates the degree vector as the vertex properties (v0) to start 
power iteration.
    +   * 
    +   * @param g a graph representing the normalized affinity matrix (W)
    +   * @return a graph with edges representing W and vertices representing 
the degree vector
    +   */
    +  def initDegreeVector(g: Graph[Double, Double]): Graph[Double, Double] = {
    +    val sum = g.vertices.values.sum()
    --- End diff --
    
    Agree. I have put that in the doc.


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