Git Product home page Git Product logo

tensor-sc's Introduction

tensor-sc

Tensor Spectral Clustering. This is the code used in the paper:

Austin R. Benson, David F. Gleich, and Jure Leskovec. "Tensor Spectral Clustering for Partitioning Higher-order Network Structures". In Proceedings of the 2015 SIAM International Conference on Data Mining (SDM), 2015.

The full version of the paper is available here.

The code is released under the simplified BSD license. Please see the LICENSE file.

For help using the code, please contact Austin: arbenson AT stanford DOT edu.

Getting started

What you need:

  • Compiler supporting C++11
  • SNAP for C++

Edit the Makefile for your compiler and the location of SNAP.

Layered flow example

First, build the example:

make layered_flow

Run the algorithms:

./layered_flow

Look at the communities for tensor spectral clustering, the directed Laplacian, and the subgraph directed Laplacian:

cat layered_flow_tsc_comms.txt
cat layered_flow_dl_comms.txt
cat layered_flow_subdl_comms.txt

Anomaly detection example

First, build the example:

make anomaly

Run the algorithms:

./anomaly

Look at the communities for tensor spectral clustering, the directed Laplacian, and the subgraph directed Laplacian:

cat anomaly_tsc_comms.txt
cat anomaly_dl_comms.txt
cat anomaly_subdl_comms.txt

Big network directed 3-cycle cut example

We will now go through the steps for running the directed 3-cycle cut algorithms on wiki-Vote, one of the SNAP networks. First, download the data:

wget http://snap.stanford.edu/data/wiki-Vote.txt.gz
gunzip wiki-Vote.txt.gz
mv wiki-Vote.txt data/

Now, filter the graph:

bash scripts/filter_data.sh wiki-Vote

Build the partitioning code:

make d3c_test

Run the algorithm:

./d3c_test 0

Visualize the number of directed 3-cycles cut as a function of the smaller partition size:

python scripts/d3c_plot.py wiki-Vote-filter num_cut

tensor-sc's People

Contributors

arbenson avatar cerebis avatar

Watchers

 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.