Skip to content
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

[SPARK-7985] [ML] [MLlib] [Docs] Remove "fittingParamMap" references. Updating ML Doc "Estimator, Transformer, and Param" examples. #6514

Conversation

dusenberrymw
Copy link
Contributor

Updating ML Doc's "Estimator, Transformer, and Param" example to use model.extractParamMap instead of model.fittingParamMap, which no longer exists.

@mengxr, I believe this addresses (part of) the update documentation TODO list item from PR 5820.

…del.extractParamMap instead of model.fittingParamMap, which no longer exists.
@dusenberrymw dusenberrymw changed the title Updating ML Doc "Estimator, Transformer, and Param" example. [ML] [Docs] Updating ML Doc "Estimator, Transformer, and Param" example. May 30, 2015
@dusenberrymw dusenberrymw changed the title [ML] [Docs] Updating ML Doc "Estimator, Transformer, and Param" example. [ML] [MLlib] [Docs] Updating ML Doc "Estimator, Transformer, and Param" example. May 30, 2015
@SparkQA
Copy link

SparkQA commented May 30, 2015

Test build #33792 has finished for PR 6514 at commit 7d34939.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class SparkSinkSuite extends FunSuite

@jkbradley
Copy link
Member

@dusenberrymw As long as you're making this update, can you please search through all of Spark for uses of fittingParamMap. It looks like some others remain. Thanks!

@dusenberrymw
Copy link
Contributor Author

Certainly!

…to use model.extractParamMap() instead of model.fittingParamMap(), which no longer exists.
@dusenberrymw dusenberrymw changed the title [ML] [MLlib] [Docs] Updating ML Doc "Estimator, Transformer, and Param" example. [ML] [MLlib] [Docs] Remove "fittingParamMap" references. Updating ML Doc "Estimator, Transformer, and Param" examples. May 31, 2015
@SparkQA
Copy link

SparkQA commented May 31, 2015

Test build #33856 has finished for PR 6514 at commit d850e0e.

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

@dusenberrymw
Copy link
Contributor Author

@jkbradley I removed all of the references to fittingParamMap throughout Spark, including fixing the equivalent ML example in Java. Thanks!

@dusenberrymw dusenberrymw changed the title [ML] [MLlib] [Docs] Remove "fittingParamMap" references. Updating ML Doc "Estimator, Transformer, and Param" examples. [SPARK-7985] [ML] [MLlib] [Docs] Remove "fittingParamMap" references. Updating ML Doc "Estimator, Transformer, and Param" examples. May 31, 2015
@dusenberrymw
Copy link
Contributor Author

I also just created a JIRA to attach this to since it ended up being more than a single commit.

@@ -207,7 +207,7 @@ val model1 = lr.fit(training.toDF)
// we can view the parameters it used during fit().
// This prints the parameter (name: value) pairs, where names are unique IDs for this
// LogisticRegression instance.
println("Model 1 was fit using parameters: " + model1.fittingParamMap)
println("Model 1 was fit using parameters: " + model1.extractParamMap)
Copy link
Member

Choose a reason for hiding this comment

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

I should have noticed before: The right way to access the parameters is really: model1.parent.extractParamMap since that gets the Params for the parent Estimator, which could potentially differ from the Model Params. Could you please update these 4 examples? Other than this, the changes look fine. Thanks!

…ramMap, since the Params of the parent Estimator could possibly differ from thos of the Model.
@dusenberrymw
Copy link
Contributor Author

@jkbradley Updated!

@SparkQA
Copy link

SparkQA commented Jun 1, 2015

Test build #33889 has finished for PR 6514 at commit 6366e1f.

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

@jkbradley
Copy link
Member

LGTM, merging with master and branch-1.4
Thanks!

asfgit pushed a commit that referenced this pull request Jun 2, 2015
… Updating ML Doc "Estimator, Transformer, and Param" examples.

Updating ML Doc's *"Estimator, Transformer, and Param"* example to use `model.extractParamMap` instead of `model.fittingParamMap`, which no longer exists.

mengxr, I believe this addresses (part of) the *update documentation* TODO list item from [PR 5820](#5820).

Author: Mike Dusenberry <dusenberrymw@gmail.com>

Closes #6514 from dusenberrymw/Fix_ML_Doc_Estimator_Transformer_Param_Example and squashes the following commits:

6366e1f [Mike Dusenberry] Updating instances of model.extractParamMap to model.parent.extractParamMap, since the Params of the parent Estimator could possibly differ from thos of the Model.
d850e0e [Mike Dusenberry] Removing all references to "fittingParamMap" throughout Spark, since it has been removed.
0480304 [Mike Dusenberry] Updating the ML Doc "Estimator, Transformer, and Param" Java example to use model.extractParamMap() instead of model.fittingParamMap(), which no longer exists.
7d34939 [Mike Dusenberry] Updating ML Doc "Estimator, Transformer, and Param" example to use model.extractParamMap instead of model.fittingParamMap, which no longer exists.

(cherry picked from commit ad06727)
Signed-off-by: Joseph K. Bradley <joseph@databricks.com>
@asfgit asfgit closed this in ad06727 Jun 2, 2015
jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request Jun 12, 2015
… Updating ML Doc "Estimator, Transformer, and Param" examples.

Updating ML Doc's *"Estimator, Transformer, and Param"* example to use `model.extractParamMap` instead of `model.fittingParamMap`, which no longer exists.

mengxr, I believe this addresses (part of) the *update documentation* TODO list item from [PR 5820](apache#5820).

Author: Mike Dusenberry <dusenberrymw@gmail.com>

Closes apache#6514 from dusenberrymw/Fix_ML_Doc_Estimator_Transformer_Param_Example and squashes the following commits:

6366e1f [Mike Dusenberry] Updating instances of model.extractParamMap to model.parent.extractParamMap, since the Params of the parent Estimator could possibly differ from thos of the Model.
d850e0e [Mike Dusenberry] Removing all references to "fittingParamMap" throughout Spark, since it has been removed.
0480304 [Mike Dusenberry] Updating the ML Doc "Estimator, Transformer, and Param" Java example to use model.extractParamMap() instead of model.fittingParamMap(), which no longer exists.
7d34939 [Mike Dusenberry] Updating ML Doc "Estimator, Transformer, and Param" example to use model.extractParamMap instead of model.fittingParamMap, which no longer exists.
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 19, 2015
… Updating ML Doc "Estimator, Transformer, and Param" examples.

Updating ML Doc's *"Estimator, Transformer, and Param"* example to use `model.extractParamMap` instead of `model.fittingParamMap`, which no longer exists.

mengxr, I believe this addresses (part of) the *update documentation* TODO list item from [PR 5820](apache#5820).

Author: Mike Dusenberry <dusenberrymw@gmail.com>

Closes apache#6514 from dusenberrymw/Fix_ML_Doc_Estimator_Transformer_Param_Example and squashes the following commits:

6366e1f [Mike Dusenberry] Updating instances of model.extractParamMap to model.parent.extractParamMap, since the Params of the parent Estimator could possibly differ from thos of the Model.
d850e0e [Mike Dusenberry] Removing all references to "fittingParamMap" throughout Spark, since it has been removed.
0480304 [Mike Dusenberry] Updating the ML Doc "Estimator, Transformer, and Param" Java example to use model.extractParamMap() instead of model.fittingParamMap(), which no longer exists.
7d34939 [Mike Dusenberry] Updating ML Doc "Estimator, Transformer, and Param" example to use model.extractParamMap instead of model.fittingParamMap, which no longer exists.
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