Skip to content

Commit 6876c1e

Browse files
committed
Update LBFGSSuite.scala
1 parent 442808a commit 6876c1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mllib/src/test/scala/org/apache/spark/mllib/optimization/LBFGSSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class LBFGSSuite extends FunSuite with LocalSparkContext with ShouldMatchers {
4343
// Add an extra variable consisting of all 1.0's for the intercept.
4444
val testData = GradientDescentSuite.generateGDInput(A, B, nPoints, 42)
4545
val data = testData.map { case LabeledPoint(label, features) =>
46-
label -> Vectors.dense(1.0, features.toArray: _*)
46+
label -> Vectors.dense(1.0 +: features.toArray)
4747
}
4848

4949
lazy val dataRDD = sc.parallelize(data, 2).cache()
@@ -55,7 +55,7 @@ class LBFGSSuite extends FunSuite with LocalSparkContext with ShouldMatchers {
5555
test("LBFGS loss should be decreasing and match the result of Gradient Descent.") {
5656
val regParam = 0
5757

58-
val initialWeightsWithIntercept = Vectors.dense(1.0, initialWeights: _*)
58+
val initialWeightsWithIntercept = Vectors.dense(1.0 +: initialWeights.toArray)
5959
val convergenceTol = 1e-12
6060
val maxNumIterations = 10
6161

0 commit comments

Comments
 (0)