-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-14644][ML][PYSPARK] Turn Binary param into a shared param #12404
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-14644][ML][PYSPARK] Turn Binary param into a shared param #12404
Conversation
|
Test build #55872 has finished for PR 12404 at commit
|
python/pyspark/ml/param/shared.py
Outdated
|
|
||
| class HasBinary(Params): | ||
| """ | ||
| Mixin for param binary: If True, all non zero results are set to 1. This is useful for discrete probabilistic models that model binary events rather than integer counts. Default False. |
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.
how come this didn't fail our style checker? did we break the pep8 checker?
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.
From toxi.ini we've excluded cloudpickle.py,heapq3.py, and shared.py, we've also done similar exclusions on the Scala side for the auto generated params.
|
Hey @holdenk, in #12079 (comment) and #12308 (comment), we decided to keep them separate for now, since the doc for So unless we can easily have different doc string, I think it might be best to not separate out |
|
So I thought the unified doc string of:
might make sense in the two cases where we are using it (since |
|
ah - sorry I missed that. Ok, yeah this makes sense if we unify the doc string appropriately. Perhaps something like |
|
Sure that sounds like a clearer docstring :) |
|
I prefer to keep them separate. There isn't much benefit to combining 2 instances, and the doc becomes a bit less clear. |
|
Fair enough. We can revisit if more estimators use the param, or if we add
|
|
Sounds good if people prefer to keep them separate I'll close this out. |
|
Test build #55961 has finished for PR 12404 at commit
|
What changes were proposed in this pull request?
Change the binary param into a shared param.
How was this patch tested?
Existing unit tests