@@ -280,7 +280,7 @@ class WeightedLeastSquaresSuite extends SparkFunSuite with MLlibTestSparkContext
280280 }
281281
282282 // Cholesky also fails when regularization is added but we don't wish to standardize
283- val wls = new WeightedLeastSquares (true , regParam = 0.5 , elasticNetParam = 0.0 ,
283+ val wls = new WeightedLeastSquares (fitIntercept = true , regParam = 0.5 , elasticNetParam = 0.0 ,
284284 standardizeFeatures = false , standardizeLabel = false ,
285285 solverType = WeightedLeastSquares .Cholesky )
286286 intercept[SingularMatrixException ] {
@@ -470,10 +470,11 @@ class WeightedLeastSquaresSuite extends SparkFunSuite with MLlibTestSparkContext
470470 var idx = 0
471471 for (fitIntercept <- Seq (false , true );
472472 regParam <- Seq (0.1 , 0.5 , 1.0 );
473- standardizeFeatures <- Seq (false , true );
473+ standardization <- Seq (false , true );
474474 elasticNetParam <- Seq (0.1 , 0.5 , 1.0 )) {
475- val wls = new WeightedLeastSquares (fitIntercept, regParam, elasticNetParam = elasticNetParam,
476- standardizeFeatures, standardizeLabel = true , solverType = WeightedLeastSquares .Auto )
475+ val wls = new WeightedLeastSquares (fitIntercept, regParam, elasticNetParam,
476+ standardizeFeatures = standardization, standardizeLabel = true ,
477+ solverType = WeightedLeastSquares .Auto )
477478 .fit(instances)
478479 val actual = Vectors .dense(wls.intercept, wls.coefficients(0 ), wls.coefficients(1 ))
479480 assert(actual ~== expected(idx) absTol 1e-4 )
@@ -528,10 +529,10 @@ class WeightedLeastSquaresSuite extends SparkFunSuite with MLlibTestSparkContext
528529 var idx = 0
529530 for (fitIntercept <- Seq (false , true );
530531 regParam <- Seq (0.0 , 0.1 , 1.0 );
531- standardizeFeatures <- Seq (false , true )) {
532+ standardization <- Seq (false , true )) {
532533 for (solver <- WeightedLeastSquares .supportedSolvers) {
533534 val wls = new WeightedLeastSquares (fitIntercept, regParam, elasticNetParam = 0.0 ,
534- standardizeFeatures, standardizeLabel = true , solverType = solver)
535+ standardizeFeatures = standardization , standardizeLabel = true , solverType = solver)
535536 .fit(instances)
536537 val actual = Vectors .dense(wls.intercept, wls.coefficients(0 ), wls.coefficients(1 ))
537538 assert(actual ~== expected(idx) absTol 1e-4 )
0 commit comments