Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Fast and scalable network clustering library

Resources

Stars

3 stars

Watchers

11 watching

Forks

Releases

Packages

Contributors

Languages