Github user dbtsai commented on a diff in the pull request: https://github.com/apache/spark/pull/10274#discussion_r49654189 --- Diff: mllib/src/main/scala/org/apache/spark/ml/optim/WeightedLeastSquares.scala --- @@ -94,8 +110,7 @@ private[ml] class WeightedLeastSquares( if (standardizeFeatures) { lambda *= aVar(j - 2) } - if (standardizeLabel) { - // TODO: handle the case when bStd = 0 + if (standardizeLabel && bStd != 0) { --- End diff -- It's interesting to see that when regularization is zero, with/without standardization on labels or features will not change the solution of Linear Regression which you can experiment. As a result, the only issue that the model will be non-interpretable will be `yStd` is zeo and `regParam` is non-zero. You can have a `require` there with proper message. I think logging a warning will be probably very easy for users to ignore. Thanks.
--- 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