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

    https://github.com/apache/spark/pull/12624#discussion_r61251215
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/regression/GeneralizedLinearRegression.scala
 ---
    @@ -761,16 +783,24 @@ class GeneralizedLinearRegressionModel private[ml] (
        * otherwise generates a new column and sets it as the prediction column 
on a new copy
        * of the current model.
        */
    -  private[regression] def findSummaryModelAndPredictionCol()
    -    : (GeneralizedLinearRegressionModel, String) = {
    +  private[regression] def getSummaryModel: 
GeneralizedLinearRegressionModel = {
         $(predictionCol) match {
           case "" =>
             val predictionColName = "prediction_" + 
java.util.UUID.randomUUID.toString
    -        (copy(ParamMap.empty).setPredictionCol(predictionColName), 
predictionColName)
    -      case p => (this, p)
    +        copy(ParamMap.empty).setPredictionCol(predictionColName)
    +      case p => this
    --- End diff --
    
    I'd like to change it to ```case p => copy(ParamMap.empty)```, and this 
will make ```GeneralizedLinearRegressionTrainingSummary``` always along with an 
immutable model.
    Users want to learn about the training summary is a specific model rather 
than an updated model. If model was updated later not by retrain, we should not 
provide updated training summary.


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