[SPARK-2495][MLLIB] make KMeans constructor public

to re-construct k-means models freeman-lab

Author: Xiangrui Meng <meng@databricks.com>

Closes #2112 from mengxr/public-constructors and squashes the following commits:

18d53a9 [Xiangrui Meng] make KMeans constructor public
This commit is contained in:
Xiangrui Meng 2014-08-25 12:30:02 -07:00
parent fb0db77242
commit 220f413686

View file

@ -25,7 +25,7 @@ import org.apache.spark.mllib.linalg.Vector
/**
* A clustering model for K-means. Each point belongs to the cluster with the closest center.
*/
class KMeansModel private[mllib] (val clusterCenters: Array[Vector]) extends Serializable {
class KMeansModel (val clusterCenters: Array[Vector]) extends Serializable {
/** Total number of clusters. */
def k: Int = clusterCenters.length