You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/01/31 18:19:19 UTC
[GitHub] bscan commented on a change in pull request #23705: [SPARK-26787]
Fix standardizeLabels error message in WeightedLeastSquares
bscan commented on a change in pull request #23705: [SPARK-26787] Fix standardizeLabels error message in WeightedLeastSquares
URL: https://github.com/apache/spark/pull/23705#discussion_r252782228
##########
File path: mllib/src/main/scala/org/apache/spark/ml/optim/WeightedLeastSquares.scala
##########
@@ -133,7 +133,8 @@ private[ml] class WeightedLeastSquares(
return new WeightedLeastSquaresModel(coefficients, intercept, diagInvAtWA, Array(0D))
} else {
require(!(regParam > 0.0 && standardizeLabel), "The standard deviation of the label is " +
- "zero. Model cannot be regularized with standardization=true")
+ "zero. Model cannot be regularized with standardizeLabel=true " +
+ "(standardizeLabel is not exposed in the LinearRegression API)")
Review comment:
Good point. Since the primary way to get here is through calling LinearRegression(), I was trying to give the user a message that indicates it's a current limitation of the API, not the implementation/algorithm. I updated to your suggestion though as I do think it's an improvement over the current message of `standardization=true`, which was simply incorrect. Thanks for reviewing!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org