org.apache.spark.mllib.clustering
PowerIterationClusteringModel
Companion object PowerIterationClusteringModel
class PowerIterationClusteringModel extends Saveable with Serializable
Model produced by PowerIterationClustering.
- Annotations
- @Since( "1.3.0" )
- Source
- PowerIterationClustering.scala
- Alphabetic
- By Inheritance
- PowerIterationClusteringModel
- Serializable
- Serializable
- Saveable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
PowerIterationClusteringModel(k: Int, assignments: RDD[Assignment])
- k
number of clusters
- assignments
an RDD of clustering
PowerIterationClustering#Assignment
s
- Annotations
- @Since( "1.3.0" )
Value Members
-
val
assignments: RDD[Assignment]
- Annotations
- @Since( "1.3.0" )
-
val
k: Int
- Annotations
- @Since( "1.3.0" )
-
def
save(sc: SparkContext, path: String): Unit
Save this model to the given path.
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
.- 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.
- Definition Classes
- PowerIterationClusteringModel → Saveable
- Annotations
- @Since( "1.4.0" )