Skip to content
Snippets Groups Projects
Commit 220f4136 authored by Xiangrui Meng's avatar Xiangrui Meng
Browse files

[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
parent fb0db772
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ import org.apache.spark.mllib.linalg.Vector ...@@ -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. * 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. */ /** Total number of clusters. */
def k: Int = clusterCenters.length def k: Int = clusterCenters.length
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment