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-26127][ML] Remove deprecated setters from tree regression and classification models #23093

Closed
wants to merge 4 commits into from

Conversation

mgaido91
Copy link
Contributor

@mgaido91 mgaido91 commented Nov 20, 2018

What changes were proposed in this pull request?

The setter methods are deprecated since 2.1 for the models of regression and classification using trees. The deprecation was stating that the method would have been removed in 3.0. Hence the PR removes the deprecated method.

How was this patch tested?

NA

@mgaido91
Copy link
Contributor Author

cc @srowen

@SparkQA
Copy link

SparkQA commented Nov 20, 2018

Test build #99047 has finished for PR 23093 at commit 56d61f3.

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

@@ -91,7 +91,7 @@ class DecisionTreeClassifier @Since("1.4.0") (

/** @group setParam */
@Since("1.4.0")
override def setImpurity(value: String): this.type = set(impurity, value)
def setImpurity(value: String): this.type = set(impurity, value)
Copy link
Member

Choose a reason for hiding this comment

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

I think we can remove these too. I assumed they were meant to be deprecated because the trait's implementation was deprecated, and there's no compelling reason to only remove it from the trait. The point was to use set().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think those can be removed. The ones which were deprecated are the setImpurity on the Models, not on the Classifiers/Regressors which build the models.

Copy link
Member

Choose a reason for hiding this comment

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

OK I think I'm wrong about the logic, given the first attempt to do this in #17867 Yes this is fine. In fact I think you're welcome to just revive that PR and remove a lot of similar deprecated methods again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, thanks. I'll update this PR removing all the other deprecated items for these models then. Thanks.

@mgaido91 mgaido91 changed the title [SPARK-26127][ML] Remove deprecated setImpurity from tree regression and classification models [SPARK-26127][ML] Remove deprecated setters from tree regression and classification models Nov 20, 2018
@SparkQA
Copy link

SparkQA commented Nov 20, 2018

Test build #99059 has finished for PR 23093 at commit 8e78883.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Nov 20, 2018

Test build #99060 has finished for PR 23093 at commit ce4a02e.

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

@SparkQA
Copy link

SparkQA commented Nov 21, 2018

Test build #99108 has finished for PR 23093 at commit 762e4de.

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

@srowen
Copy link
Member

srowen commented Nov 21, 2018

Merged to master

@asfgit asfgit closed this in 4aa9ccb Nov 21, 2018
jackylee-ch pushed a commit to jackylee-ch/spark that referenced this pull request Feb 18, 2019
…classification models

## What changes were proposed in this pull request?

The setter methods are deprecated since 2.1 for the models of regression and classification using trees. The deprecation was stating that the method would have been removed in 3.0. Hence the PR removes the deprecated method.

## How was this patch tested?

NA

Closes apache#23093 from mgaido91/SPARK-26127.

Authored-by: Marco Gaido <marcogaido91@gmail.com>
Signed-off-by: Sean Owen <sean.owen@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants