-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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-24439][ML][PYTHON]Add distanceMeasure to BisectingKMeans in PySpark #21557
Conversation
Test build #91788 has finished for PR 21557 at commit
|
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.
Thanks @huaxingao , looks pretty good! I think we just needs to overload the set/get methods in BisectingKMeans and add the since decorator
""" | ||
setParams(self, featuresCol="features", predictionCol="prediction", maxIter=20, \ | ||
seed=None, k=4, minDivisibleClusterSize=1.0) | ||
seed=None, k=4, minDivisibleClusterSize=1.0, distanceMeasure="euclidean") | ||
Sets params for BisectingKMeans. |
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.
I know we already have setDistanceMeasure
and getDistanceMeasure
methods from the shared param, but can you also add them here so we can use the since
decorator? (same as KMeans)
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.
@BryanCutler Thank you very much for your review. I will make change.
Test build #92404 has finished for PR 21557 at commit
|
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.
LGTM
merged to master, thanks @huaxingao ! |
Thank you very much for your help! @BryanCutler |
What changes were proposed in this pull request?
add distanceMeasure to BisectingKMeans in Python.
How was this patch tested?
added doctest and also manually tested it.