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

    https://github.com/apache/spark/pull/5249#discussion_r27498701
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/classification/LogisticRegression.scala
 ---
    @@ -145,13 +135,20 @@ class LogisticRegressionModel (
            */
           var bestClass = 0
           var maxMargin = 0.0
    -      var i = 0
    -      while(i < margins.size) {
    -        if (margins(i) > maxMargin) {
    -          maxMargin = margins(i)
    +      val withBias = if (dataMatrix.size + 1 == dataWithBiasSize) true 
else false
    --- End diff --
    
    In Multinomial Logistic Regression, the intercepts will be parts of the 
weights.
    So we need to get whether the model add intercepts and will be checked only 
once at here rather than in each iteration..


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