Skip to content

Commit a378496

Browse files
committed
use the correct subscript syntax in PIC
1 parent c65c424 commit a378496

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

mllib/src/main/scala/org/apache/spark/mllib/clustering/PowerIterationClustering.scala

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,12 @@ class PowerIterationClustering private[clustering] (
8888
/**
8989
* Run the PIC algorithm.
9090
*
91-
* @param similarities an RDD of (i, j, s_ij_) tuples representing the affinity matrix, which is
92-
* the matrix A in the PIC paper. The similarity s_ij_ must be nonnegative.
93-
* This is a symmetric matrix and hence s_ij_ = s_ji_. For any (i, j) with
94-
* nonzero similarity, there should be either (i, j, s_ij_) or (j, i, s_ji_)
95-
* in the input. Tuples with i = j are ignored, because we assume s_ij_ = 0.0.
91+
* @param similarities an RDD of (i, j, s,,ij,,) tuples representing the affinity matrix, which is
92+
* the matrix A in the PIC paper. The similarity s,,ij,, must be nonnegative.
93+
* This is a symmetric matrix and hence s,,ij,, = s,,ji,,. For any (i, j) with
94+
* nonzero similarity, there should be either (i, j, s,,ij,,) or
95+
* (j, i, s,,ji,,) in the input. Tuples with i = j are ignored, because we
96+
* assume s,,ij,, = 0.0.
9697
*
9798
* @return a [[PowerIterationClusteringModel]] that contains the clustering result
9899
*/
@@ -109,7 +110,7 @@ class PowerIterationClustering private[clustering] (
109110
* Runs the PIC algorithm.
110111
*
111112
* @param w The normalized affinity matrix, which is the matrix W in the PIC paper with
112-
* w_ij_ = a_ij_ / d_ii_ as its edge properties and the initial vector of the power
113+
* w,,ij,, = a,,ij,, / d,,ii,, as its edge properties and the initial vector of the power
113114
* iteration as its vertex properties.
114115
*/
115116
private def pic(w: Graph[Double, Double]): PowerIterationClusteringModel = {

0 commit comments

Comments
 (0)