public class PowerIterationClusteringModel extends java.lang.Object implements Saveable, scala.Serializable
Model produced by PowerIterationClustering
.
param: k number of clusters
param: assignments an RDD of clustering PowerIterationClustering#Assignment
s
Constructor and Description |
---|
PowerIterationClusteringModel(int k,
RDD<PowerIterationClustering.Assignment> assignments) |
Modifier and Type | Method and Description |
---|---|
RDD<PowerIterationClustering.Assignment> |
assignments() |
protected java.lang.String |
formatVersion()
Current version of model save/load format.
|
int |
k() |
static PowerIterationClusteringModel |
load(SparkContext sc,
java.lang.String path) |
void |
save(SparkContext sc,
java.lang.String path)
Save this model to the given path.
|
public PowerIterationClusteringModel(int k, RDD<PowerIterationClustering.Assignment> assignments)
public static PowerIterationClusteringModel load(SparkContext sc, java.lang.String path)
public int k()
public RDD<PowerIterationClustering.Assignment> assignments()
public void save(SparkContext sc, java.lang.String path)
Saveable
This saves: - human-readable (JSON) model metadata to path/metadata/ - Parquet formatted data to path/data/
The model may be loaded using Loader.load
.
protected java.lang.String formatVersion()
Saveable
formatVersion
in interface Saveable