Skip to content

Commit bbff347

Browse files
author
DB Tsai
committed
naming
1 parent baa0805 commit bbff347

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class LinearRegression(override val uid: String)
182182
val optimizer = if ($(elasticNetParam) == 0.0 || effectiveRegParam == 0.0) {
183183
new BreezeLBFGS[BDV[Double]]($(maxIter), 10, $(tol))
184184
} else {
185-
def regParamL1Fun = (index: Int) => {
185+
def effectiveL1RegFun = (index: Int) => {
186186
if ($(standardization)) {
187187
effectiveL1RegParam
188188
} else {
@@ -194,7 +194,7 @@ class LinearRegression(override val uid: String)
194194
if (featuresStd(index) != 0.0) effectiveL1RegParam / featuresStd(index) else 0.0
195195
}
196196
}
197-
new BreezeOWLQN[Int, BDV[Double]]($(maxIter), 10, regParamL1Fun, $(tol))
197+
new BreezeOWLQN[Int, BDV[Double]]($(maxIter), 10, effectiveL1RegFun, $(tol))
198198
}
199199

200200
val initialWeights = Vectors.zeros(numFeatures)

0 commit comments

Comments
 (0)