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-20631][PYTHON][ML] LogisticRegression._checkThresholdConsistency should use values not Params #17891

Closed
wants to merge 1 commit into from

Conversation

zero323
Copy link
Member

@zero323 zero323 commented May 7, 2017

What changes were proposed in this pull request?

  • Replace getParam calls with getOrDefault calls.
  • Fix exception message to avoid unintended TypeError.
  • Add unit tests

How was this patch tested?

New unit tests.

@zero323 zero323 changed the title [SPARK-11834][PYTHON][ML] LogisticRegression._checkThresholdConsistency should use values not Params [SPARK-20631][PYTHON][ML] LogisticRegression._checkThresholdConsistency should use values not Params May 7, 2017
@zero323 zero323 closed this May 7, 2017
@zero323 zero323 reopened this May 7, 2017
@SparkQA
Copy link

SparkQA commented May 7, 2017

Test build #76548 has finished for PR 17891 at commit 098e262.

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

@SparkQA
Copy link

SparkQA commented May 7, 2017

Test build #76549 has finished for PR 17891 at commit 098e262.

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

@zero323
Copy link
Member Author

zero323 commented May 8, 2017

cc @jkbradley

@yanboliang
Copy link
Contributor

yanboliang commented May 10, 2017

LGTM, merged into master and branch-2.2/2.1/2.0. Thanks!

asfgit pushed a commit that referenced this pull request May 10, 2017
…cy should use values not Params

## What changes were proposed in this pull request?

- Replace `getParam` calls with `getOrDefault` calls.
- Fix exception message to avoid unintended `TypeError`.
- Add unit tests

## How was this patch tested?

New unit tests.

Author: zero323 <zero323@users.noreply.github.com>

Closes #17891 from zero323/SPARK-20631.

(cherry picked from commit 804949c)
Signed-off-by: Yanbo Liang <ybliang8@gmail.com>
asfgit pushed a commit that referenced this pull request May 10, 2017
…cy should use values not Params

## What changes were proposed in this pull request?

- Replace `getParam` calls with `getOrDefault` calls.
- Fix exception message to avoid unintended `TypeError`.
- Add unit tests

## How was this patch tested?

New unit tests.

Author: zero323 <zero323@users.noreply.github.com>

Closes #17891 from zero323/SPARK-20631.

(cherry picked from commit 804949c)
Signed-off-by: Yanbo Liang <ybliang8@gmail.com>
asfgit pushed a commit that referenced this pull request May 10, 2017
…cy should use values not Params

## What changes were proposed in this pull request?

- Replace `getParam` calls with `getOrDefault` calls.
- Fix exception message to avoid unintended `TypeError`.
- Add unit tests

## How was this patch tested?

New unit tests.

Author: zero323 <zero323@users.noreply.github.com>

Closes #17891 from zero323/SPARK-20631.

(cherry picked from commit 804949c)
Signed-off-by: Yanbo Liang <ybliang8@gmail.com>
@asfgit asfgit closed this in 804949c May 10, 2017
@zero323
Copy link
Member Author

zero323 commented May 10, 2017

Thanks @yanboliang!

def logistic_regression_check_thresholds(self):
self.assertIsInstance(
LogisticRegression(threshold=0.5, thresholds=[0.5, 0.5]),
LogisticRegressionModel
Copy link
Member

Choose a reason for hiding this comment

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

@zero323 @yanboliang Am I missing something? Why should the LogisticRegression constructor return an instance of type LogisticRegressionModel? Should you have to call fit?

Copy link
Contributor

Choose a reason for hiding this comment

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

It shouldn't, but it's weird that Jenkins always passed the test. Anyway, let's fix it. Thanks for catching this.

liyichao pushed a commit to liyichao/spark that referenced this pull request May 24, 2017
…cy should use values not Params

## What changes were proposed in this pull request?

- Replace `getParam` calls with `getOrDefault` calls.
- Fix exception message to avoid unintended `TypeError`.
- Add unit tests

## How was this patch tested?

New unit tests.

Author: zero323 <zero323@users.noreply.github.com>

Closes apache#17891 from zero323/SPARK-20631.
@zero323
Copy link
Member Author

zero323 commented May 24, 2017

@jkbradley It shouldn't. It is not a correct test #18085

jzhuge pushed a commit to jzhuge/spark that referenced this pull request Aug 20, 2018
…cy should use values not Params

- Replace `getParam` calls with `getOrDefault` calls.
- Fix exception message to avoid unintended `TypeError`.
- Add unit tests

New unit tests.

Author: zero323 <zero323@users.noreply.github.com>

Closes apache#17891 from zero323/SPARK-20631.

(cherry picked from commit 804949c)
Signed-off-by: Yanbo Liang <ybliang8@gmail.com>
@zero323 zero323 deleted the SPARK-20631 branch February 2, 2020 17:49
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