Skip to content

Commit 1b47566

Browse files
ddna1021Robert Kruszewski
authored andcommitted
Update StreamingKMeans.scala
## What changes were proposed in this pull request? I think the ‘n_t+t’ in the following code may be wrong, it shoud be ‘n_t+1’ that means is the number of points to the cluster after it finish the no.t+1 min-batch. * <blockquote> * $$ * \begin{align} * c_t+1 &= [(c_t * n_t * a) + (x_t * m_t)] / [n_t + m_t] \\ * n_t+t &= n_t * a + m_t * \end{align} * $$ * </blockquote> Author: Fan Donglai <[email protected]> Closes apache#21179 from ddna1021/master.
1 parent 3d2afef commit 1b47566

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import org.apache.spark.util.random.XORShiftRandom
4343
* $$
4444
* \begin{align}
4545
* c_t+1 &= [(c_t * n_t * a) + (x_t * m_t)] / [n_t + m_t] \\
46-
* n_t+t &= n_t * a + m_t
46+
* n_t+1 &= n_t * a + m_t
4747
* \end{align}
4848
* $$
4949
* </blockquote>

0 commit comments

Comments
 (0)