These codes are for our paper "Locally-biased Spectral Approximation for Community Detection"
Before compiling codes, the following software should be installed in your system.
- Matlab
- gcc (for Linux and Mac) or Microsoft Visual Studio (for Windows)
- SNAP datasets (available at http://snap.stanford.edu/data/)
- LFR benchmark graphs (available at http://sites.google.com/site/santofortunato/inthepress2/)
- Amazon dataset (available at http://snap.stanford.edu/data/com-Amazon.html)
- nodes: 334863, edges: 925872
- nodes are products, edges are co-purchase relationships
- top 5000 communities with ground truth size >= 3
$ cd LBSA_codes
$ matlab
$ mex -largeArrayDims GetLocalCond.cpp % compile the mex file
$ mex -largeArrayDims rwvec_mex.cpp % compile the mex file
$ mex -largeArrayDims pprvec_mex.cpp % compile the mex file
$ mex -largeArrayDims hkvec_mex.cpp % compile the mex file
$ LBSA(sampleMode,algsMode)
sampleMode: sampling method (random walk, personalized PageRank and heat kernel diffusion)
algsMode: locally-biased spectral approximation algorithm (Lanczos method or power iteration)
$ cd baseline_codes/LEMON
$ matlab
$ LEMON
$ cd baseline_codes/LOSP
$ matlab
$ LOSP
$ cd baseline_codes/HK
$ matlab
$ mex -largeArrayDims hkgrow_mex.cpp % compile the mex file
$ HK
$ cd baseline_codes/PR
$ matlab
$ mex -largeArrayDims pprgrow_mex.cc % compile the mex file
$ PR
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://fsf.org/.
Please email to panshi@hust.edu.cn or setup an issue if you have any problems or find any bugs.
In the program, we incorporate some open source codes as baseline algorithms from the following websites: