diff options
author | coderxiang <shuoxiangpub@gmail.com> | 2014-10-27 19:43:39 -0700 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2014-10-27 19:43:39 -0700 |
commit | 7e3a1ada86e6adf1ddd4d8a321824daf5f3b2c75 (patch) | |
tree | 28e56f2ef6007b5310f00fc23f6d4188eb331a31 /mllib/src/main | |
parent | bfa614b12795f1cfce4de0950f90cb8c4f2a7d53 (diff) | |
download | spark-7e3a1ada86e6adf1ddd4d8a321824daf5f3b2c75.tar.gz spark-7e3a1ada86e6adf1ddd4d8a321824daf5f3b2c75.tar.bz2 spark-7e3a1ada86e6adf1ddd4d8a321824daf5f3b2c75.zip |
[MLlib] SPARK-3987: add test case on objective value for NNLS
Also update step parameter to pass the proposed test
Author: coderxiang <shuoxiangpub@gmail.com>
Closes #2965 from coderxiang/nnls-test and squashes the following commits:
24b06f9 [coderxiang] add test case on objective value for NNLS; update step parameter to pass the test
Diffstat (limited to 'mllib/src/main')
-rw-r--r-- | mllib/src/main/scala/org/apache/spark/mllib/optimization/NNLS.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/optimization/NNLS.scala b/mllib/src/main/scala/org/apache/spark/mllib/optimization/NNLS.scala index e4b436b023..fef062e02b 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/optimization/NNLS.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/optimization/NNLS.scala @@ -79,7 +79,7 @@ private[mllib] object NNLS { // stopping condition def stop(step: Double, ndir: Double, nx: Double): Boolean = { ((step.isNaN) // NaN - || (step < 1e-6) // too small or negative + || (step < 1e-7) // too small or negative || (step > 1e40) // too small; almost certainly numerical problems || (ndir < 1e-12 * nx) // gradient relatively too small || (ndir < 1e-32) // gradient absolutely too small; numerical issues may lurk |