Description Usage Arguments Value Note Examples
A scalable graph clustering algorithm. Users can call spark.assignClusters
to
return a cluster assignment for each input vertex.
Run the PIC algorithm and returns a cluster assignment for each input vertex.
1 2 3 4 5 6 7 8 9 10 11 12 | spark.assignClusters(data, ...)
## S4 method for signature 'SparkDataFrame'
spark.assignClusters(
data,
k = 2L,
initMode = c("random", "degree"),
maxIter = 20L,
sourceCol = "src",
destinationCol = "dst",
weightCol = NULL
)
|
data |
a SparkDataFrame. |
... |
additional argument(s) passed to the method. |
k |
the number of clusters to create. |
initMode |
the initialization algorithm; "random" or "degree" |
maxIter |
the maximum number of iterations. |
sourceCol |
the name of the input column for source vertex IDs. |
destinationCol |
the name of the input column for destination vertex IDs |
weightCol |
weight column name. If this is not set or |
A dataset that contains columns of vertex id and the corresponding cluster for the id.
The schema of it will be: id: integer
, cluster: integer
spark.assignClusters(SparkDataFrame) since 3.0.0
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.