zhengruifeng commented on a change in pull request #25859:
[SPARK-29142][PYTHON][ML] Pyspark clustering models support column
setters/getters/predict
URL: https://github.com/apache/spark/pull/25859#discussion_r327469357
##########
File path: python/pyspark/ml/clustering.py
##########
@@ -135,10 +156,16 @@ def summary(self):
raise RuntimeError("No training summary available for this %s" %
self.__class__.__name__)
+ @since("3.0.0")
+ def predict(self, value):
+ """
+ Predict label for the given features.
+ """
+ return self._call_java("predict", value)
+
Review comment:
we should add `def predictProbability` as well
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]