Fast and scalable network clustering library using Fast Modularity algorithm.
Add the following dependency to your project.clj:
[gugus "0.1.0-SNAPSHOT"]
(require 'gugus.core)
(def pairs [["AAA" "BBB"]
["AAA" "CCC"]
["AAA" "DDD"]
["AAA" "EEE"]
...
["III" "LLL"]
["JJJ" "KKK"]
["JJJ" "LLL"]
["KKK" "LLL"]]) ; graph edges
(gugus.core/cluster-mm pairs)
;; => {:q 0.420654296875
;; :communities {"LLL" #{"III" "KKK" "JJJ" "LLL" "GGG" "HHH"}
;; "FFF" #{"BBB" "DDD" "EEE" "FFF" "CCC" "AAA"}}}
(require 'gugus.core)
(def pairs [["AAA" "BBB" 0.403]
["AAA" "CCC" 0.135]
["AAA" "DDD" 0.224]
["AAA" "EEE" 0.336]
...
["III" "LLL" 0.378]
["JJJ" "KKK" 0.068]
["JJJ" "LLL" 0.949]
["KKK" "LLL" 0.363]]) ; graph edges with weight
(gugus.core/cluster-weight-mm pairs)
;; => {:q 0.8618539514068584
;; :communities {"LLL" #{"III" "KKK" "JJJ" "LLL" "GGG" "HHH"}
;; "FFF" #{"BBB" "DDD" "EEE" "FFF" "CCC" "AAA"}}}
lein with-profile test,1.8 midje
Copyright Xcoo, Inc.
Licensed under the Apache License, Version 2.0.