huaxingao opened a new pull request #28786:
URL: https://github.com/apache/spark/pull/28786


   
   ### What changes were proposed in this pull request?
   In LogisticRegression and LinearRegression, if set maxIter=n, the 
model.summary.totalIterations returns  n+1 if the training procedure does not 
drop out. This is because we use ```objectiveHistory.length``` as 
totalIterations, but ```objectiveHistory``` contains init sate, thus 
```objectiveHistory.length``` is 1 larger than number of training iterations.
   
   ### Why are the changes needed?
   correctness
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   add new tests and also modify existing tests
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to