Introdiction
============
The code implements the S3 model and SSD model proposed in our paper. It can be used for finding representative nodes in networks given their attributes and relations. Please read our paper for more details.
If using this code for publications, please cite the following paper:
@INPROCEEDINGS{
    Tang:15AAAI,
    AUTHOR = "Jie Tang and Chenhui Zhang and Keke Cai and Li Zhang and Zhong Su",
    TITLE = "Sampling Representative Users from Social Network",
    BOOKTITLE = "AAAI'15",
    YEAR = {2015}
}

Usage
=====
Type the cmd 'make' to build the program. You can run the program without arguments to show the usage.
Usage: repuser [options]
options:
    -model     string : model(s3/ssd)
    -k            int : the size of representative set, default: 200
    -beta      double : parameter for S3 model, default: 0.7
    -attribute string : attribute file to load
    -relation  string : relation file to load
    -output    string : output file
example:
repuser -model s3 -k 100 -beta 0.6 -attribute attribute.txt -relation relation.txt -output output.txt
repuser -model ssd -attribute attribute.txt -relation relation.txt -output output.txt

Data Format
===========
attribute file:
Each line describes one node and its attribute factors in the network, the first column denotes the node index and the next k colunms list the attribute value of the node.
example:
node_index attrib1 attrib2 attrib2 attrib3 
1          0       1       0       0
2          1       0       1       0
3          0       1       0       1
4          1       0       0       0
5          1       0       1       1

relation file:
Each line describes one edge and its weight in the network, the first 2 columns denotes node index corresponding to the edge and the last column is the weight of the edge.
node_index1 node_index2 weight
1           3           1
2           5           2
3           4           1
3           5           3
4           5           2

Output
======
The top k representative nodes in the network and the running time of the program.

