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

    https://github.com/apache/spark/pull/15593#discussion_r86421340
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
 ---
    @@ -1486,57 +1489,75 @@ private class LogisticAggregator(
         var marginOfLabel = 0.0
         var maxMargin = Double.NegativeInfinity
     
    -    val margins = Array.tabulate(numClasses) { i =>
    -      var margin = 0.0
    -      features.foreachActive { (index, value) =>
    -        if (localFeaturesStd(index) != 0.0 && value != 0.0) {
    -          margin += localCoefficients(i * numFeaturesPlusIntercept + 
index) *
    -            value / localFeaturesStd(index)
    -        }
    +    val margins = new Array[Double](numClasses)
    --- End diff --
    
    It may be good to just add a general comment (perhaps in 
LogisticAggregator) about the training being done using col major order, and 
that this is converted to row major once training is done, etc? And perhaps a 
little detail on why it is (was) necessary.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to