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

    https://github.com/apache/spark/pull/15593#discussion_r87516339
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
 ---
    @@ -489,13 +485,14 @@ class LogisticRegression @Since("1.2.0") (
               val initialCoefWithInterceptArray = 
initialCoefficientsWithIntercept.toArray
    --- End diff --
    
    When we are looping the coefficients array in LiR or BLOR in a flatten 
array, people think about it by looping through in the direction of features. 
In this PR, the logic is changed, and can lead to some maintenance issues when 
developers work on those code later. For example, I have difficulty to 
understand the code at the first glance. I think what we can do alternatively 
when we do L1/L2 update logic and initial coefficients things, we can put them 
into col major matrix, and use foreachActive with explicit col and row index so 
reader can easily understand the code logic.  


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