Repository: spark
Updated Branches:
refs/heads/master 0d210ec8b -> 2fa33649d
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 #21179 from ddna1021/master.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/2fa33649
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/2fa33649
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/2fa33649
Branch: refs/heads/master
Commit: 2fa33649d96394ae630a092a9f7e1261d1893f6e
Parents: 0d210ec
Author: Fan Donglai <[email protected]>
Authored: Sun May 13 18:10:00 2018 -0500
Committer: Sean Owen <[email protected]>
Committed: Sun May 13 18:10:00 2018 -0500
----------------------------------------------------------------------
.../scala/org/apache/spark/mllib/clustering/StreamingKMeans.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/2fa33649/mllib/src/main/scala/org/apache/spark/mllib/clustering/StreamingKMeans.scala
----------------------------------------------------------------------
diff --git
a/mllib/src/main/scala/org/apache/spark/mllib/clustering/StreamingKMeans.scala
b/mllib/src/main/scala/org/apache/spark/mllib/clustering/StreamingKMeans.scala
index 3ca75e8..7a5e520 100644
---
a/mllib/src/main/scala/org/apache/spark/mllib/clustering/StreamingKMeans.scala
+++
b/mllib/src/main/scala/org/apache/spark/mllib/clustering/StreamingKMeans.scala
@@ -43,7 +43,7 @@ import org.apache.spark.util.random.XORShiftRandom
* $$
* \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
+ * n_t+1 &= n_t * a + m_t
* \end{align}
* $$
* </blockquote>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]