A Java-friendly constructor that takes an Iterable of Vectors.
A Java-friendly constructor that takes an Iterable of Vectors.
Return the K-means cost (sum of squared distances of points to their nearest center) for this model on the given data.
Return the K-means cost (sum of squared distances of points to their nearest center) for this model on the given data.
Current version of model save/load format.
Current version of model save/load format.
Total number of clusters.
Total number of clusters.
Maps given points to their cluster indices.
Maps given points to their cluster indices.
Maps given points to their cluster indices.
Maps given points to their cluster indices.
Returns the cluster index that a given point belongs to.
Returns the cluster index that a given point belongs to.
Save this model to the given path.
Save this model to the given path.
This saves:
The model may be loaded using Loader.load
.
Spark context used to save model data.
Path specifying the directory in which to save this model. If the directory already exists, this method throws an exception.
Export the model to a String in PMML format
Export the model to a String in PMML format
Export the model to the OutputStream in PMML format
Export the model to the OutputStream in PMML format
Export the model to a directory on a distributed file system in PMML format
Export the model to a directory on a distributed file system in PMML format
Export the model to a local file in PMML format
Export the model to a local file in PMML format
A clustering model for K-means. Each point belongs to the cluster with the closest center.