Skip to content

Commit

Permalink
Make a few variables, setters and getters be expert ones
Browse files Browse the repository at this point in the history
  • Loading branch information
yu-iskw committed Jul 16, 2015
1 parent b2c205c commit e186be1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mllib/src/main/scala/org/apache/spark/ml/clustering/KMeans.scala
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,23 @@ private[clustering] trait KMeansParams
* Param for the initialization algorithm. This can be either "random" to choose random points as
* initial cluster centers, or "k-means||" to use a parallel variant of k-means++
* (Bahmani et al., Scalable K-Means++, VLDB 2012). Default: k-means||.
* @group param
* @group expertParam
*/
final val initMode = new Param[String](this, "initMode", "initialization algorithm",
(value: String) => MLlibKMeans.validateInitializationMode(value))

/** @group getParam */
/** @group getExpertParam */
def getInitMode: String = $(initMode)

/**
* Param for the number of steps for the k-means|| initialization mode. This is an advanced
* setting -- the default of 5 is almost always enough. Default: 5.
* @group param
* @group expertParam
*/
final val initSteps = new IntParam(this, "initSteps", "number of steps for k-means||",
(value: Int) => value > 0)

/** @group getParam */
/** @group getExpertParam */
def getInitSteps: Int = $(initSteps)

/**
Expand Down Expand Up @@ -163,10 +163,10 @@ class KMeans(override val uid: String) extends Estimator[KMeansModel] with KMean
/** @group setParam */
def setK(value: Int): this.type = set(k, value)

/** @group setParam */
/** @group setExpertParam */
def setInitMode(value: String): this.type = set(initMode, value)

/** @group setParam */
/** @group setExpertParam */
def setInitSteps(value: Int): this.type = set(initSteps, value)

/** @group setParam */
Expand Down

0 comments on commit e186be1

Please sign in to comment.