You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by me...@apache.org on 2015/09/21 01:16:36 UTC

spark git commit: [SPARK-10715] [ML] Duplicate initialization flag in WeightedLeastSquare

Repository: spark
Updated Branches:
  refs/heads/master 1aa9e5025 -> 0c498717b


[SPARK-10715] [ML] Duplicate initialization flag in WeightedLeastSquare

There are duplicate set of initialization flag in `WeightedLeastSquares#add`.
`initialized` is already set in `init(Int)`.

Author: lewuathe <le...@me.com>

Closes #8837 from Lewuathe/duplicate-initialization-flag.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/0c498717
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/0c498717
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/0c498717

Branch: refs/heads/master
Commit: 0c498717ba9622b6c889e701e8eed5ef9215c030
Parents: 1aa9e50
Author: lewuathe <le...@me.com>
Authored: Sun Sep 20 16:16:31 2015 -0700
Committer: Xiangrui Meng <me...@databricks.com>
Committed: Sun Sep 20 16:16:31 2015 -0700

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/ml/optim/WeightedLeastSquares.scala | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/0c498717/mllib/src/main/scala/org/apache/spark/ml/optim/WeightedLeastSquares.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/ml/optim/WeightedLeastSquares.scala b/mllib/src/main/scala/org/apache/spark/ml/optim/WeightedLeastSquares.scala
index 0ff8931..4374e99 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/optim/WeightedLeastSquares.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/optim/WeightedLeastSquares.scala
@@ -193,7 +193,6 @@ private[ml] object WeightedLeastSquares {
       val ak = a.size
       if (!initialized) {
         init(ak)
-        initialized = true
       }
       assert(ak == k, s"Dimension mismatch. Expect vectors of size $k but got $ak.")
       count += 1L


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org