Skip to content

[SPARK-15316][PySpark][ML] Add linkPredictionCol to GeneralizedLinearRegression - #13106

Closed
holdenk wants to merge 2 commits into
apache:masterfrom
holdenk:SPARK-15316-add-linkPredictionCol-toGeneralizedLinearRegression
Closed

[SPARK-15316][PySpark][ML] Add linkPredictionCol to GeneralizedLinearRegression#13106
holdenk wants to merge 2 commits into
apache:masterfrom
holdenk:SPARK-15316-add-linkPredictionCol-toGeneralizedLinearRegression

Conversation

@holdenk

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Add linkPredictionCol to GeneralizedLinearRegression and fix the PyDoc to generate the bullet list

How was this patch tested?

doctests & built docs locally

@SparkQA

Copy link
Copy Markdown

Test build #58592 has finished for PR 13106 at commit f062750.

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

Comment threadpython/pyspark/ml/regression.py Outdated
... (2.0, Vectors.dense(1.0, 1.0)),], ["label", "features"])
>>> glr = GeneralizedLinearRegression(family="gaussian", link="identity")
>>> glr = GeneralizedLinearRegression(family="gaussian", link="identity", linkPredictionCol="p")
>>> print(glr.getLinkPredictionCol())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minor, but is this really necessary? By definition it would be set correctly if the test below succeeds >>> abs(transformed.head().p - 1.5) < 0.001

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Makes sense, I'll remove it.

@MLnick

Copy link
Copy Markdown
Contributor

A minor comment, otherwise LGTM.

@SparkQA

Copy link
Copy Markdown

Test build #58630 has finished for PR 13106 at commit d4cb4d7.

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

@yanboliang

Copy link
Copy Markdown
Contributor

LGTM

@holdenk

Copy link
Copy Markdown
ContributorAuthor

Shall we merge then?

@MLnick

Copy link
Copy Markdown
Contributor

Yup - merged to master/branch-2.0. Thanks for the reminder.

asfgit pushed a commit that referenced this pull request May 19, 2016
…Regression
## What changes were proposed in this pull request?
Add linkPredictionCol to GeneralizedLinearRegression and fix the PyDoc to generate the bullet list
## How was this patch tested?
doctests & built docs locally
Author: Holden Karau <holden@us.ibm.com>
Closes#13106 from holdenk/SPARK-15316-add-linkPredictionCol-toGeneralizedLinearRegression.
(cherry picked from commit e71cd96)
Signed-off-by: Nick Pentreath <nickp@za.ibm.com>
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 <simonh@tw.ibm.com>
Closes#13220 from viirya/hotfix-regresstion.
(cherry picked from commit 4e73933)
Signed-off-by: Nick Pentreath <nickp@za.ibm.com>
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 <simonh@tw.ibm.com>
Closes#13220 from viirya/hotfix-regresstion.
Sign up for freeto 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.

4 participants

@holdenk@SparkQA@MLnick@yanboliang