Skip to content

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 <[email protected]>

Closes #17891 from zero323/SPARK-20631.

(cherry picked from commit 804949c)
Signed-off-by: Yanbo Liang <[email protected]>
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 <[email protected]>

Closes #17891 from zero323/SPARK-20631.

(cherry picked from commit 804949c)
Signed-off-by: Yanbo Liang <[email protected]>
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 <[email protected]>

Closes #17891 from zero323/SPARK-20631.

(cherry picked from commit 804949c)
Signed-off-by: Yanbo Liang <[email protected]>
@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.

lycplus pushed a commit to lycplus/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 <[email protected]>

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 <[email protected]>

Closes apache#17891 from zero323/SPARK-20631.

(cherry picked from commit 804949c)
Signed-off-by: Yanbo Liang <[email protected]>
@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