diff options
author | lewuathe <lewuathe@me.com> | 2015-09-20 16:16:31 -0700 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2015-09-20 16:16:31 -0700 |
commit | 0c498717ba9622b6c889e701e8eed5ef9215c030 (patch) | |
tree | 63010961f47a76f819ecd852ce217ea5a992c6bc /mllib | |
parent | 1aa9e50256988533fa54584b49dbc408a14438ee (diff) | |
download | spark-0c498717ba9622b6c889e701e8eed5ef9215c030.tar.gz spark-0c498717ba9622b6c889e701e8eed5ef9215c030.tar.bz2 spark-0c498717ba9622b6c889e701e8eed5ef9215c030.zip |
[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 <lewuathe@me.com>
Closes #8837 from Lewuathe/duplicate-initialization-flag.
Diffstat (limited to 'mllib')
-rw-r--r-- | mllib/src/main/scala/org/apache/spark/ml/optim/WeightedLeastSquares.scala | 1 |
1 files changed, 0 insertions, 1 deletions
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 0ff8931b0b..4374e99631 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 |