aboutsummaryrefslogtreecommitdiff
path: root/mllib/src/main
diff options
context:
space:
mode:
authorcoderxiang <shuoxiangpub@gmail.com>2014-10-27 19:43:39 -0700
committerXiangrui Meng <meng@databricks.com>2014-10-27 19:43:39 -0700
commit7e3a1ada86e6adf1ddd4d8a321824daf5f3b2c75 (patch)
tree28e56f2ef6007b5310f00fc23f6d4188eb331a31 /mllib/src/main
parentbfa614b12795f1cfce4de0950f90cb8c4f2a7d53 (diff)
downloadspark-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.scala2
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