Fast and scalable network clustering library
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test-resources
test/gugus
.gitignore
.travis.yml
LICENSE
README.md
project.clj

README.md

gugus

Build Status

Clojars Project

Fast and scalable network clustering library using Fast Modularity algorithm.

Usage

Add the following dependency to your project.clj:

[gugus "0.1.0-SNAPSHOT"]

Simple Clustering

(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"}}}

Weighted Clustering

(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"}}}

Test

lein with-profile test,1.8 midje

Licence

Copyright Xcoo, Inc.

Licensed under the Apache License, Version 2.0.