CLUSTER(1)
π CLUSTER(1) π
okay bestie, welcome to the cluster manual page, from the General Commands Manual section, no less. she's a little program that looks at your graph and goes "hmm. who's in whose friend group?" β and then she writes that info right back into your graph. iconic behaviour honestly.
β¨ NAME β¨
cluster β find clusters in a graph and augment the graph with this information.
like. that's the whole job. find the friend groups, label the friend groups, move on. π
πΈ SYNOPSIS πΈ
cluster [-v?] [ -Ck ] [ -ck ] [ -o outfile ] [ files ]
π¦ DESCRIPTION π¦
so cluster takes a graph in DOT format as input, finds the node clusters in it, and then augments the graph with that info. she doesn't just tell you about the clusters β she writes them into the graph. main character energy.
the clusters are specified by the "cluster" attribute attached to nodes, and cluster values are non-negative integers. cluster attempts to maximize the modularity of the clustering. (modularity = how good the groupings are, basically, it's giving "are these actual cliques or are we just guessing".)
oh and β if the edge attribute "weight" is defined, that gets used in computing the clustering. so yes, your weights matter, bestie. don't skip them. π«Ά
π OPTIONS π
the following options are supported:
-Ckβ specifies a targeted number of clusters that should be generated. and like, listen: the numberkyou give is only a suggestion and may not be realisable. ifk == 0(which is the default), you get the number of clusters that approximately optimizes the modularity. so she'll do the math herself.-ckβ specifies the clustering method. ifk == 0, the default, modularity clustering will be used. ifk == 1, modularity quality will be used.-ooutfileβ specifies that output should go into the file outfile. by default,stdoutis used.-vβ verbose mode. she will talk. a lot. π¬-?β prints the usage and exits. (she's had enough.)
π₯ EXAMPLES π₯
applying cluster to the following graph,
graph {
1--2 [weight=10.]
2--3 [weight=1]
3--4 [weight=10.]
4--5 [weight=10]
5--6 [weight=10]
3--6 [weight=0.1]
4--6 [weight=10.]
}
gives
graph {
node [cluster="-1"];
1 [cluster=1];
2 [cluster=1];
3 [cluster=2];
4 [cluster=2];
5 [cluster=2];
6 [cluster=2];
1 -- 2 [weight="10."];
2 -- 3 [weight=1];
3 -- 4 [weight="10."];
4 -- 5 [weight=10];
5 -- 6 [weight=10];
3 -- 6 [weight="0.1"];
4 -- 6 [weight="10."];
}
see that? {1, 2} became one cluster and {3, 4, 5, 6} became another, the default node [cluster="-1"] got dropped in at the top, and she rewrote all your weights as strings. ate. π
π AUTHOR π
Yifan Hu <yifanhu@yahoo.com>
π SEE ALSO π
gvmap(1)- Blondel, V.D., Guillaume, J.L., Lambiotte, R., Lefebvre, E.: Fast unfolding of communities in large networks. Journal of Statistical Mechanics: Theory and Experiment (2008), P10008.
ngl that paper is literally where this whole modularity-clustering vibe comes from. iykyk. πβ¨
and that's the whole page, babe β this one's from the General Commands Manual, dated 3 March 2011, and it's literally called CLUSTER(1). periodt. ππ
π¦ where this page comes from
- alpine 3.22: graphviz-doc 12.2.1-r0 Β· EPL-1.0
- alpine 3.23: graphviz-doc 12.2.1-r0 Β· EPL-1.0
- alpine 3.24: graphviz-doc 12.2.1-r3 Β· EPL-1.0
- arch rolling: graphviz 16.1.0-2 Β· EPL
- centos-stream 10: graphviz 9.0.0-15.el10 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- centos-stream 9: graphviz 2.44.0-26.el9 Β· EPL-1.0
- centos-stream 9: graphviz 2.44.0-26.el9 Β· EPL-1.0
- fedora 43: graphviz 13.1.1-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz 13.1.1-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz 13.1.2-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz 13.1.2-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.2-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.2-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.4-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.4-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- nixos 26.05: graphviz 12.2.1
- nixpkgs unstable: graphviz 15.1.1
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms