zhengruifeng commented on a change in pull request #28595:
URL: https://github.com/apache/spark/pull/28595#discussion_r430125369
##########
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 {
+
+ /**
+ * Param for The number of clusters to create. Must be (> 1). Note that
it is possible for fewer than k clusters to be returned.
+ * @group param
+ */
+ final val k: IntParam = new IntParam(this, "k", "The number of clusters to
create. Must be (> 1). Note that it is possible for fewer than k clusters to be
returned", ParamValidators.gt(1))
+
+ /** @group getParam */
+ final def getK: Int = $(k)
Review comment:
I am also neutral on this change.
----------------------------------------------------------------
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]