Skip to content

Commit 61ca2fc

Browse files
mengxrconviva-zz
authored andcommitted
[SPARK-2495][MLLIB] make KMeans constructor public
to re-construct k-means models freeman-lab Author: Xiangrui Meng <meng@databricks.com> Closes apache#2112 from mengxr/public-constructors and squashes the following commits: 18d53a9 [Xiangrui Meng] make KMeans constructor public
1 parent 5f1d025 commit 61ca2fc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeansModel.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import org.apache.spark.mllib.linalg.Vector
2525
/**
2626
* A clustering model for K-means. Each point belongs to the cluster with the closest center.
2727
*/
28-
class KMeansModel private[mllib] (val clusterCenters: Array[Vector]) extends Serializable {
28+
class KMeansModel (val clusterCenters: Array[Vector]) extends Serializable {
2929

3030
/** Total number of clusters. */
3131
def k: Int = clusterCenters.length

0 commit comments

Comments
 (0)