You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2014/05/23 22:02:44 UTC
git commit: Update LBFGSSuite.scala
Repository: spark
Updated Branches:
refs/heads/master b2bdd0e50 -> a08262d87
Update LBFGSSuite.scala
the same reason as https://github.com/apache/spark/pull/588
Author: baishuo(白硕) <vc...@hotmail.com>
Closes #815 from baishuo/master and squashes the following commits:
6876c1e [baishuo(白硕)] Update LBFGSSuite.scala
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/a08262d8
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/a08262d8
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/a08262d8
Branch: refs/heads/master
Commit: a08262d8769808dd3a8ee1b1e80fbf6ac13a557c
Parents: b2bdd0e
Author: baishuo(白硕) <vc...@hotmail.com>
Authored: Fri May 23 13:02:40 2014 -0700
Committer: Reynold Xin <rx...@apache.org>
Committed: Fri May 23 13:02:40 2014 -0700
----------------------------------------------------------------------
.../scala/org/apache/spark/mllib/optimization/LBFGSSuite.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/a08262d8/mllib/src/test/scala/org/apache/spark/mllib/optimization/LBFGSSuite.scala
----------------------------------------------------------------------
diff --git a/mllib/src/test/scala/org/apache/spark/mllib/optimization/LBFGSSuite.scala b/mllib/src/test/scala/org/apache/spark/mllib/optimization/LBFGSSuite.scala
index 6af1b50..820eca9 100644
--- a/mllib/src/test/scala/org/apache/spark/mllib/optimization/LBFGSSuite.scala
+++ b/mllib/src/test/scala/org/apache/spark/mllib/optimization/LBFGSSuite.scala
@@ -43,7 +43,7 @@ class LBFGSSuite extends FunSuite with LocalSparkContext with ShouldMatchers {
// Add an extra variable consisting of all 1.0's for the intercept.
val testData = GradientDescentSuite.generateGDInput(A, B, nPoints, 42)
val data = testData.map { case LabeledPoint(label, features) =>
- label -> Vectors.dense(1.0, features.toArray: _*)
+ label -> Vectors.dense(1.0 +: features.toArray)
}
lazy val dataRDD = sc.parallelize(data, 2).cache()
@@ -55,7 +55,7 @@ class LBFGSSuite extends FunSuite with LocalSparkContext with ShouldMatchers {
test("LBFGS loss should be decreasing and match the result of Gradient Descent.") {
val regParam = 0
- val initialWeightsWithIntercept = Vectors.dense(1.0, initialWeights: _*)
+ val initialWeightsWithIntercept = Vectors.dense(1.0 +: initialWeights.toArray)
val convergenceTol = 1e-12
val maxNumIterations = 10