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_r327470745
 
 

 ##########
 File path: python/pyspark/ml/clustering.py
 ##########
 @@ -347,14 +418,20 @@ class KMeans(JavaEstimator, HasDistanceMeasure, 
HasFeaturesCol, HasPredictionCol
     >>> df = spark.createDataFrame(data, ["features"])
     >>> kmeans = KMeans(k=2, seed=1)
     >>> model = kmeans.fit(df)
+    >>> model.getDistanceMeasure()
+    'euclidean'
+    >>> model.setPredictionCol("newPrediction")
+    KMeans...
 
 Review comment:
   KMeansModel...

----------------------------------------------------------------
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]

Reply via email to