-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-21306][ML] For branch 2.0, OneVsRest should support setWeightCol #18764
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-21306][ML] For branch 2.0, OneVsRest should support setWeightCol #18764
Conversation
## What changes were proposed in this pull request? add `setWeightCol` method for OneVsRest. `weightCol` is ignored if classifier doesn't inherit HasWeightCol trait. ## How was this patch tested? + [x] add an unit test. Author: Yan Facai (颜发才) <[email protected]> Closes #18554 from facaiy/BUG/oneVsRest_missing_weightCol. (cherry picked from commit a5a3189) Signed-off-by: Yanbo Liang <[email protected]>
## What changes were proposed in this pull request? add `setWeightCol` method for OneVsRest. `weightCol` is ignored if classifier doesn't inherit HasWeightCol trait. ## How was this patch tested? + [x] add an unit test. Author: Yan Facai (颜发才) <[email protected]> Closes apache#18554 from facaiy/BUG/oneVsRest_missing_weightCol. (cherry picked from commit a5a3189) Signed-off-by: Yanbo Liang <[email protected]>
0c60c28 to
e695889
Compare
|
Jenkins, test this please. |
|
@srowen Could you help to trigger this job? Thanks. |
|
Thanks, @yanboliang . Could you give a hand, @srowen ? |
|
Test build #3865 has finished for PR 18764 at commit
|
|
Jenkins, test this please. |
|
Test failures in pyspark.ml.tests with python2.6, but I don't have the environment. |
|
@facaiy No worries, I will take a look. |
|
@yanboliang Thanks, yanbo. I am not familar with python 2.6, which is too outdated. |
python/pyspark/ml/classification.py
Outdated
| weightCol = self.getWeightCol() | ||
| else: | ||
| warnings.warn("weightCol is ignored, " | ||
| "as it is not supported by {} now.".format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for help, @yanboliang !
|
@SparkQA Take a test, please. |
|
ok to test |
|
Jenkins, test this please. |
|
ok to test |
|
Test build #80344 has finished for PR 18764 at commit
|
|
Thanks, @yanboliang @gatorsmile |
|
Merged into branch-2.0. Thanks @facaiy @gatorsmile |
The PR is related to #18554, and is modified for branch 2.0. ## What changes were proposed in this pull request? add `setWeightCol` method for OneVsRest. `weightCol` is ignored if classifier doesn't inherit HasWeightCol trait. ## How was this patch tested? + [x] add an unit test. Author: Yan Facai (颜发才) <[email protected]> Closes #18764 from facaiy/BUG/branch-2.0_OneVsRest_support_setWeightCol.
|
It seems github can't close this PR automatically. @facaiy Please feel free to close it manually. Thanks. |
|
Sure, thanks, @yanboliang ! |
The PR is related to #18554, and is modified for branch 2.0.
What changes were proposed in this pull request?
add
setWeightColmethod for OneVsRest.weightColis ignored if classifier doesn't inherit HasWeightCol trait.How was this patch tested?