Git Product home page Git Product logo

bhcd's Introduction

Bayesian Hierarchical Community Detection

Build Status Windows

Origin

This repository comes from bhcd. The main difference is that this repository uses CMake build system while the original one uses autoconfig. The build instructions has some problems even with Unix system. We use CMake to make the algorithm cross-platform, supporting Windows and Unix.

How to build

You need to install glib and gsl as dependency. Then using standard cmake way to build the project for your operating system.

How to run

Run the executable program

$ cat >tiny.gml <<EOF
graph [
    sparse 0
    node [ id 0 label "a" ]
    node [ id 1 label "b" ]
    node [ id 2 label "c" ]
    edge [ source 0 target 1 weight 1 ]
    edge [ source 1 target 0 weight 1 ]
]
EOF
$ ./src/bhcd/bhcd -S -p tiny tiny.gml
seed: 2a23b6bb
output prefix: tiny
time: 3.010000e-04s
tree: logprob: -1.92e+00 (0:4,1:2/0:4,1:0) #intern: 2 -1.92e+00:{-1.03e+00:{a , b }, c }
$ ./scripts/bhcd_plot tiny.tree tiny.fit tiny.pdf
-4.82e+00:{-1.66e-01:{a, b}, c}

Then tiny.pdf will have a plot of the clustering.

Run all tests

Windows Support

Originally the code does not work on Windows. The bug comes from length of unsigned long is 4 bytes on Windows. See ulong for detail. This commit fixes this problem.

Reference Paper

Blundell, C., & Teh, Y. W. (2013). Bayesian hierarchical community discovery. In Advances in Neural Information Processing Systems (pp. 1601-1609).

@inproceedings{blundell2013bayesian,
  title={Bayesian hierarchical community discovery},
  author={Blundell, Charles and Teh, Yee Whye},
  booktitle={Advances in Neural Information Processing Systems},
  pages={1601--1609},
  year={2013}
}

bhcd's People

Contributors

zhaofeng-shu33 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.