aboutsummaryrefslogtreecommitdiff
path: root/mllib/src/test
diff options
context:
space:
mode:
authorXiangrui Meng <meng@databricks.com>2015-03-03 23:52:02 -0800
committerXiangrui Meng <meng@databricks.com>2015-03-03 23:52:02 -0800
commit76e20a0a03cf2c02db35e00271924efb070eaaa5 (patch)
tree73c944fa1950db6eba7df0050e2be37c2c207a68 /mllib/src/test
parentd334bfbcf38d0c1c6835e72bc85e42196e295744 (diff)
downloadspark-76e20a0a03cf2c02db35e00271924efb070eaaa5.tar.gz
spark-76e20a0a03cf2c02db35e00271924efb070eaaa5.tar.bz2
spark-76e20a0a03cf2c02db35e00271924efb070eaaa5.zip
[SPARK-6141][MLlib] Upgrade Breeze from 0.10 to 0.11 to fix convergence bug
LBFGS and OWLQN in Breeze 0.10 has convergence check bug. This is fixed in 0.11, see the description in Breeze project for detail: https://github.com/scalanlp/breeze/pull/373#issuecomment-76879760 Author: Xiangrui Meng <meng@databricks.com> Author: DB Tsai <dbtsai@alpinenow.com> Author: DB Tsai <dbtsai@dbtsai.com> Closes #4879 from dbtsai/breeze and squashes the following commits: d848f65 [DB Tsai] Merge pull request #1 from mengxr/AlpineNow-breeze c2ca6ac [Xiangrui Meng] upgrade to breeze-0.11.1 35c2f26 [Xiangrui Meng] fix LRSuite 397a208 [DB Tsai] upgrade breeze
Diffstat (limited to 'mllib/src/test')
-rw-r--r--mllib/src/test/scala/org/apache/spark/mllib/classification/LogisticRegressionSuite.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/mllib/src/test/scala/org/apache/spark/mllib/classification/LogisticRegressionSuite.scala b/mllib/src/test/scala/org/apache/spark/mllib/classification/LogisticRegressionSuite.scala
index d2b40f2cae..aaa81da9e2 100644
--- a/mllib/src/test/scala/org/apache/spark/mllib/classification/LogisticRegressionSuite.scala
+++ b/mllib/src/test/scala/org/apache/spark/mllib/classification/LogisticRegressionSuite.scala
@@ -372,8 +372,12 @@ class LogisticRegressionSuite extends FunSuite with MLlibTestSparkContext with M
testRDD2.cache()
testRDD3.cache()
+ val numIteration = 10
+
val lrA = new LogisticRegressionWithLBFGS().setIntercept(true)
+ lrA.optimizer.setNumIterations(numIteration)
val lrB = new LogisticRegressionWithLBFGS().setIntercept(true).setFeatureScaling(false)
+ lrB.optimizer.setNumIterations(numIteration)
val modelA1 = lrA.run(testRDD1, initialWeights)
val modelA2 = lrA.run(testRDD2, initialWeights)