Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaido91 committed Mar 18, 2018
1 parent 8b16af6 commit f6ee4a2
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 2 deletions.
Expand Up @@ -305,6 +305,7 @@ object BisectingKMeans extends DefaultParamsReadable[BisectingKMeans] {
* @param predictionCol Name for column of predicted clusters in `predictions`.
* @param featuresCol Name for column of features in `predictions`.
* @param k Number of clusters.
* @param numIter Number of iterations.
*/
@Since("2.1.0")
@Experimental
Expand Down
Expand Up @@ -28,6 +28,7 @@ import org.apache.spark.sql.{DataFrame, Row}
* @param predictionCol Name for column of predicted clusters in `predictions`.
* @param featuresCol Name for column of features in `predictions`.
* @param k Number of clusters.
* @param numIter Number of iterations.
*/
@Experimental
class ClusteringSummary private[clustering] (
Expand Down
Expand Up @@ -683,6 +683,7 @@ private class ExpectationAggregator(
* @param featuresCol Name for column of features in `predictions`.
* @param k Number of clusters.
* @param logLikelihood Total log-likelihood for this model on the given data.
* @param numIter Number of iterations.
*/
@Since("2.0.0")
@Experimental
Expand Down
Expand Up @@ -363,6 +363,7 @@ object KMeans extends DefaultParamsReadable[KMeans] {
* @param predictionCol Name for column of predicted clusters in `predictions`.
* @param featuresCol Name for column of features in `predictions`.
* @param k Number of clusters.
* @param numIter Number of iterations.
*/
@Since("2.0.0")
@Experimental
Expand Down
Expand Up @@ -36,7 +36,7 @@ import org.apache.spark.sql.{Row, SparkSession}
* A clustering model for K-means. Each point belongs to the cluster with the closest center.
*/
@Since("0.8.0")
class KMeansModel private[spark] (@Since("1.0.0") val clusterCenters: Array[Vector],
class KMeansModel (@Since("1.0.0") val clusterCenters: Array[Vector],
@Since("2.4.0") val distanceMeasure: String,
private[spark] val numIter: Int)
extends Saveable with Serializable with PMMLExportable {
Expand Down
Expand Up @@ -99,7 +99,6 @@ class BisectingKMeansSuite
test("fit, transform and summary") {
val predictionColName = "bisecting_kmeans_prediction"
val bkm = new BisectingKMeans().setK(k).setPredictionCol(predictionColName).setSeed(1)

val model = bkm.fit(dataset)
assert(model.clusterCenters.length === k)

Expand Down

0 comments on commit f6ee4a2

Please sign in to comment.