huaxingao commented on a change in pull request #28595:
URL: https://github.com/apache/spark/pull/28595#discussion_r430036649



##########
File path: python/pyspark/ml/clustering.py
##########
@@ -99,23 +99,13 @@ def numIter(self):
 @inherit_doc
 class _GaussianMixtureParams(HasMaxIter, HasFeaturesCol, HasSeed, 
HasPredictionCol,
                              HasProbabilityCol, HasTol, HasAggregationDepth, 
HasWeightCol,
-                             HasBlockSize):
+                             HasBlockSize, HasK):

Review comment:
       Thanks for your comment.  Unfortunately we can't change to 
```HasNumOfClusters``` because  ```k``` /```getK```/```setK``` were used in the 
previous releases. 

##########
File path: 
mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala
##########
@@ -562,4 +562,20 @@ trait HasBlockSize extends Params {
   /** @group expertGetParam */
   final def getBlockSize: Int = $(blockSize)
 }
+
+/**
+ * Trait for shared param k. This trait may be changed or
+ * removed between minor versions.
+ */
+trait HasK extends Params {
+

Review comment:
       @keypointt 
   We normally test the parameters (default value, getter and setter) in each 
of the individual algorithm. We have existing tests that cover default value of 
k, getK, setK in all the clustering algorithms. 




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to