Update StreamingKMeans.scala
authorFan Donglai <ddna_1022@163.com>
Sun, 13 May 2018 23:10:00 +0000 (18:10 -0500)
committerSean Owen <srowen@gmail.com>
Sun, 13 May 2018 23:10:00 +0000 (18:10 -0500)
commit2fa33649d96394ae630a092a9f7e1261d1893f6e
tree50635fb7b1bb9f60cc64f1c0d381e466d64c4532
parent0d210ec8b610e4b0570ce730f3987dc86787c663
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 <ddna_1022@163.com>

Closes #21179 from ddna1021/master.
mllib/src/main/scala/org/apache/spark/mllib/clustering/StreamingKMeans.scala