org.apache.spark.mllib.clustering
Class PowerIterationClusteringModel

Object
  extended by org.apache.spark.mllib.clustering.PowerIterationClusteringModel
All Implemented Interfaces:
java.io.Serializable, Saveable

public class PowerIterationClusteringModel
extends Object
implements Saveable, scala.Serializable

:: Experimental ::

Model produced by PowerIterationClustering.

param: k number of clusters param: assignments an RDD of clustering PowerIterationClustering#Assignments

See Also:
Serialized Form

Constructor Summary
PowerIterationClusteringModel(int k, RDD<PowerIterationClustering.Assignment> assignments)
           
 
Method Summary
 RDD<PowerIterationClustering.Assignment> assignments()
           
 int k()
           
static PowerIterationClusteringModel load(SparkContext sc, String path)
           
 void save(SparkContext sc, String path)
          Save this model to the given path.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PowerIterationClusteringModel

public PowerIterationClusteringModel(int k,
                                     RDD<PowerIterationClustering.Assignment> assignments)
Method Detail

load

public static PowerIterationClusteringModel load(SparkContext sc,
                                                 String path)

k

public int k()

assignments

public RDD<PowerIterationClustering.Assignment> assignments()

save

public void save(SparkContext sc,
                 String path)
Description copied from interface: Saveable
Save this model to the given path.

This saves: - human-readable (JSON) model metadata to path/metadata/ - Parquet formatted data to path/data/

The model may be loaded using Loader.load.

Specified by:
save in interface Saveable
Parameters:
sc - Spark context used to save model data.
path - Path specifying the directory in which to save this model. If the directory already exists, this method throws an exception.