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

    https://github.com/apache/spark/pull/13796#discussion_r75064275
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
 ---
    @@ -1082,57 +1343,62 @@ private class LogisticCostFun(
         fitIntercept: Boolean,
         standardization: Boolean,
         bcFeaturesStd: Broadcast[Array[Double]],
    -    regParamL2: Double) extends DiffFunction[BDV[Double]] {
    +    regParamL2: Double,
    +    multinomial: Boolean) extends DiffFunction[BDV[Double]] {
     
       val featuresStd = bcFeaturesStd.value
     
       override def calculate(coefficients: BDV[Double]): (Double, BDV[Double]) 
= {
    -    val numFeatures = featuresStd.length
         val coeffs = Vectors.fromBreeze(coefficients)
         val bcCoeffs = instances.context.broadcast(coeffs)
    -    val n = coeffs.size
    +    val localFeaturesStd = featuresStd
    --- End diff --
    
    Where is `localFeaturesStd` being used? Why not move `val featuresStd = 
bcFeaturesStd.value` into the `calculate method`?


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