@graphty/algorithms / index / indexed / syncClustering
Function: syncClustering() ​
syncClustering(
s,options):SyncClusteringResult
Defined in: indexed/sync.ts:307
SynC over a snapshot: node embeddings seeded from degree and a seeded generator, each moved part of the way to the mean of its out-neighbors' embeddings at every step, and clustered by k-means with k-means++ centers. Smoothing gathers a connected community within a few steps, and run long enough it would gather each whole connected part into one point, so the run stops once the cluster assignment has held for 10 iterations (or the loss settles). Unconnected cliques of any size come back as separate clusters, and planted communities as their own clusters. The order of every random draw is the legacy syncClustering's, but legacy took a fixed gradient step that also pulled every node toward the origin, so its results differ (see issues #1600 and #1698). The port draws from its own generator instead of replacing Math.random for the duration of the call.
Weights are ignored and a parallel arc pulls once per arc. The seeding degree is legacy's: in plus out when directed, the stored arc count when undirected, so an undirected self-loop counts once.
Parameters ​
s ​
GraphSnapshot
The snapshot
options ​
Returns ​
Assignments, embeddings and convergence