Skip to content

[SPARK-13993][PySpark] Add pyspark Rformula/RforumlaModel save/load #11807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

yinxusen
Copy link
Contributor

What changes were proposed in this pull request?

https://issues.apache.org/jira/browse/SPARK-13993

How was this patch tested?

doctest

@yinxusen
Copy link
Contributor Author

test it please

@SparkQA
Copy link

SparkQA commented Mar 18, 2016

Test build #53487 has finished for PR 11807 at commit cf59634.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class RFormula(JavaEstimator, HasFeaturesCol, HasLabelCol, MLReadable, MLWritable):
    • class RFormulaModel(JavaModel, MLReadable, MLWritable):

@yinxusen
Copy link
Contributor Author

@jkbradley This is a follow-up for #9884

@@ -2385,7 +2385,31 @@ class RFormula(JavaEstimator, HasFeaturesCol, HasLabelCol):
|0.0|0.0| a|[0.0,1.0]| 0.0|
+---+---+---+---------+-----+
...
>>> rf.fit(df, {rf.formula: "y ~ . - s"}).transform(df).show()
>>> model = rf.fit(df, {rf.formula: "y ~ . - s"})
Copy link
Member

Choose a reason for hiding this comment

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

How about reusing the fit model from above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean use the rf.fit(df) other than this rf.fit(df, {rf.formula: "y ~ . - s"}) ?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, sorry, I originally thought this was a new fit() being added, and I wanted to avoid unnecessary model fitting. I now see it was already there, so it's fine either way.

@SparkQA
Copy link

SparkQA commented Mar 19, 2016

Test build #53602 has finished for PR 11807 at commit d31bb3f.

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

@jkbradley
Copy link
Member

LGTM
Merging with master

@asfgit asfgit closed this in 454a00d Mar 20, 2016
roygao94 pushed a commit to roygao94/spark that referenced this pull request Mar 22, 2016
## What changes were proposed in this pull request?

https://issues.apache.org/jira/browse/SPARK-13993

## How was this patch tested?

doctest

Author: Xusen Yin <yinxusen@gmail.com>

Closes apache#11807 from yinxusen/SPARK-13993.
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.

3 participants