Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7080#discussion_r33739011
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
 ---
    @@ -149,15 +158,28 @@ class LogisticRegression(override val uid: String)
         val regParamL1 = $(elasticNetParam) * $(regParam)
         val regParamL2 = (1.0 - $(elasticNetParam)) * $(regParam)
     
    -    val costFun = new LogisticCostFun(instances, numClasses, 
$(fitIntercept),
    +    val costFun = new LogisticCostFun(instances, numClasses, 
$(fitIntercept), $(standardization),
           featuresStd, featuresMean, regParamL2)
     
         val optimizer = if ($(elasticNetParam) == 0.0 || $(regParam) == 0.0) {
           new BreezeLBFGS[BDV[Double]]($(maxIter), 10, $(tol))
         } else {
    -      // Remove the L1 penalization on the intercept
           def regParamL1Fun = (index: Int) => {
    -        if (index == numFeatures) 0.0 else regParamL1
    +        // Remove the L1 penalization on the intercept
    +        if (index == numFeatures) 0.0 else {
    --- End diff --
    
    We either put `if ... else ...` in a single line or use `{..}` for both.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to