Skip to content

[SPARK-10097] Adds shouldMaximize flag to ml.evaluation.Evaluator - #8290

Closed
feynmanliang wants to merge 5 commits into
apache:masterfrom
feynmanliang:SPARK-10097
Closed

feynmanliang wants to merge 5 commits into
apache:masterfrom
feynmanliang:SPARK-10097

Conversation

@feynmanliang

Copy link
Copy Markdown
Contributor

Previously, users of evaluator (CrossValidator and TrainValidationSplit) would only maximize the metric in evaluator, leading to a hacky solution which negated metrics to be minimized and caused erroneous negative values to be reported to the user.

This PR adds a isLargerBetter attribute to the Evaluator base class, instructing users of Evaluator on whether the chosen metric should be maximized or minimized.

CC @jkbradley

@SparkQA

SparkQA commented Aug 18, 2015

Copy link
Copy Markdown

Test build #41173 has finished for PR 8290 at commit 7b00d2e.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • implicit class StringToColumn(val sc: StringContext)

@feynmanliang

Copy link
Copy Markdown
Contributor Author

jenkins test this please

@jkbradley

Copy link
Copy Markdown
Member

LGTM pending tests

@SparkQA

SparkQA commented Aug 19, 2015

Copy link
Copy Markdown

Test build #41180 has finished for PR 8290 at commit 027eb3a.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • implicit class StringToColumn(val sc: StringContext)

@feynmanliang

Copy link
Copy Markdown
Contributor Author

Jenkins test this please

On Tue, Aug 18, 2015, 10:24 PM UCB AMPLab [email protected] wrote:

Merged build finished. Test FAILed.

—
Reply to this email directly or view it on GitHub
#8290 (comment).

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.

  • Evaluator reports the metrics but not maximizes them. I would suggest isLargerBetter instead.
  • This is a break change if we don't put a default value. I would suggest a default value true to keep it consistent with implementations in Spark 1.4.

@mengxr

mengxr commented Aug 19, 2015

Copy link
Copy Markdown
Contributor

@feynmanliang Could you change the title to ml.evaluation.Evaluator?

@feynmanliang feynmanliang changed the title [SPARK-10097] Adds shouldMaximize flag to ml.tuning.Evaluator [SPARK-10097] Adds shouldMaximize flag to ml.evaluation.Evaluator Aug 19, 2015
@SparkQA

SparkQA commented Aug 19, 2015

Copy link
Copy Markdown

Test build #41259 has finished for PR 8290 at commit 314b43e.

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

@jkbradley

Copy link
Copy Markdown
Member

Merging with master and branch-1.5

asfgit pushed a commit that referenced this pull request Aug 19, 2015
Previously, users of evaluator (`CrossValidator` and `TrainValidationSplit`) would only maximize the metric in evaluator, leading to a hacky solution which negated metrics to be minimized and caused erroneous negative values to be reported to the user.

This PR adds a `isLargerBetter` attribute to the `Evaluator` base class, instructing users of `Evaluator` on whether the chosen metric should be maximized or minimized.

CC jkbradley

Author: Feynman Liang <[email protected]>
Author: Joseph K. Bradley <[email protected]>

Closes #8290 from feynmanliang/SPARK-10097.

(cherry picked from commit 28a9846)
Signed-off-by: Joseph K. Bradley <[email protected]>
@asfgit asfgit closed this in 28a9846 Aug 19, 2015
@feynmanliang
feynmanliang deleted the SPARK-10097 branch August 25, 2015 22:57
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.

4 participants