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

    https://github.com/apache/spark/pull/17715#discussion_r113066007
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
 ---
    @@ -434,8 +587,45 @@ class LogisticRegression @Since("1.2.0") (
               $(standardization), bcFeaturesStd, regParamL2, multinomial = 
isMultinomial,
               $(aggregationDepth))
     
    +        val numCoeffs = numFeaturesPlusIntercept * numCoefficientSets
    +        val isSetLowerBoundOfCoefficients = isSet(lowerBoundOfCoefficients)
    +        val isSetUpperBoundOfCoefficients = isSet(upperBoundOfCoefficients)
    +        val isSetLowerBoundOfIntercept = isSet(lowerBoundOfIntercept)
    +        val isSetUpperBoundOfIntercept = isSet(upperBoundOfIntercept)
    +        var lowerBound: Array[Double] = null
    +        var upperBound: Array[Double] = null
    +
             val optimizer = if ($(elasticNetParam) == 0.0 || $(regParam) == 
0.0) {
    -          new BreezeLBFGS[BDV[Double]]($(maxIter), 10, $(tol))
    --- End diff --
    
    With the above, we can
    
    ```scala
    val optimizer = if ($(elasticNetParam) == 0.0 || $(regParam) == 0.0) {
      if (lowerBound != null && upperBound !=null) {
         new BreezeLBFGSB(BDV[Double](lowerBound), BDV[Double](upperBound), 
$(maxIter), 10, $(tol))
      } else {
         new BreezeLBFGS[BDV[Double]]($(maxIter), 10, $(tol))
      }
    ```


---
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