Skip to content

Conversation

@viirya
Copy link
Member

@viirya viirya commented May 20, 2016

What changes were proposed in this pull request?

Default value mismatch of param linkPredictionCol for GeneralizedLinearRegression between PySpark and Scala. That is because default value conflict between #13106 and #13129. This causes ml.tests failed.

How was this patch tested?

Existing tests.

@viirya
Copy link
Member Author

viirya commented May 20, 2016

cc @MLnick @mengxr This is a hotfix. Please take a look. Thanks.

@MLnick
Copy link
Contributor

MLnick commented May 20, 2016

@viirya ah thanks I should have picked up the discrepancy. cc @holdenk @yanboliang

"org.apache.spark.ml.regression.GeneralizedLinearRegression", self.uid)
self._setDefault(family="gaussian", maxIter=25, tol=1e-6, regParam=0.0, solver="irls",
linkPredictionCol="")
self._setDefault(family="gaussian", maxIter=25, tol=1e-6, regParam=0.0, solver="irls")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should then make the default in __init__ and setParams be None rather than ""?

Copy link
Member Author

@viirya viirya May 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not sure about this. So just following other similar params in other classes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Let me update it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the setDefault change you have is fine - I mean the default
constructor param
On Fri, 20 May 2016 at 11:37, Liang-Chi Hsieh [email protected]
wrote:

In python/pyspark/ml/regression.py
#13220 (comment):

@@ -1312,8 +1312,7 @@ def init(self, labelCol="label", featuresCol="features", predictionCol="pred
super(GeneralizedLinearRegression, self).init()
self._java_obj = self._new_java_obj(
"org.apache.spark.ml.regression.GeneralizedLinearRegression", self.uid)

  •    self._setDefault(family="gaussian", maxIter=25, tol=1e-6, regParam=0.0, solver="irls",
    
  •                     linkPredictionCol="")
    
  •    self._setDefault(family="gaussian", maxIter=25, tol=1e-6, regParam=0.0, solver="irls")
    

I was not sure about this. So just following other similar params in other
classes.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/apache/spark/pull/13220/files/132753838a1424f09d85003a4436bb7ce0bd7774#r64014350

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea. Updated. Thanks.

@SparkQA
Copy link

SparkQA commented May 20, 2016

Test build #58973 has finished for PR 13220 at commit 1327538.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@MLnick
Copy link
Contributor

MLnick commented May 20, 2016

Fortunately it doesn't actually impact since there is a nonEmpty check on the Scala side, but we should definitely make it consistent.

@viirya
Copy link
Member Author

viirya commented May 20, 2016

@MLnick unit tests in ml.tests will be failed due to this. This should be the only impact I think.

@SparkQA
Copy link

SparkQA commented May 20, 2016

Test build #58975 has finished for PR 13220 at commit 74c8bc8.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@viirya
Copy link
Member Author

viirya commented May 20, 2016

@MLnick Please see if this is fine for you now. Thanks.

@yanboliang
Copy link
Contributor

This fix looks good. Thanks! @viirya

@viirya
Copy link
Member Author

viirya commented May 20, 2016

Thank you @yanboliang

@viirya
Copy link
Member Author

viirya commented May 20, 2016

ping @MLnick

asfgit pushed a commit that referenced this pull request May 20, 2016
…nkPredictionCol for GeneralizedLinearRegression

## What changes were proposed in this pull request?

Default value mismatch of param linkPredictionCol for GeneralizedLinearRegression between PySpark and Scala. That is because default value conflict between #13106 and #13129. This causes ml.tests failed.

## How was this patch tested?
Existing tests.

Author: Liang-Chi Hsieh <[email protected]>

Closes #13220 from viirya/hotfix-regresstion.

(cherry picked from commit 4e73933)
Signed-off-by: Nick Pentreath <[email protected]>
@MLnick
Copy link
Contributor

MLnick commented May 20, 2016

Merged to master/branch-2.0. Thanks @viirya!

@asfgit asfgit closed this in 4e73933 May 20, 2016
@viirya
Copy link
Member Author

viirya commented May 20, 2016

Thank you @MLnick

@holdenk
Copy link
Contributor

holdenk commented May 20, 2016

Thanks for fixing this @viirya :)

@mengxr
Copy link
Contributor

mengxr commented May 20, 2016

@viirya Thanks for fixing this quickly! @MLnick If master is broken, we should revert the commit first to unblock others (especially during QA period). We can re-submit the PR with fix.

@viirya viirya deleted the hotfix-regresstion branch December 27, 2023 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants