Skip to content

xiaojingzi/StructInf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README for StructInfCounter

How to run?
1. Download source code in Linux;
2. "cd" to the source directory, and execute "make"; an executable file "structinf" will be built under the directory;
3. (1) To run the demo on sythesized dataset:
      a) download sythesized folder "testdata";
	     Note: test graph is an Erdos-Renyi random graph of 1000 nodes & 15196 directed edges;
      b) execute "./structinf testdata/graph.txt testdata/logs.txt . /3,1,1,1/";
      c) a result file "runlog_" will be created under the current directory, containing the exact numbers of active & inactive influence patterns and influence probabilities. (an example output file is provided under "testdata/".)
   (3) To specify parameters and run on your own dataset:
      a) enter "./structinf" to see usage:
		   "./structinf GRAPH_FILE LOG_FILE OUT_DIR /tau1,px1,py1,q1/*times1,/tau2,px2,py2,q2/*times2,...
        1) GRAPH_FILE - a directed graph of user relations in the following format:
            USER_COUNT (optional)EDGE_COUNT
            uid1 k vid1 vid2 ... vidk
            ...
           Note that 0 <= uid,vid < USER_COUNT,
        2) LOG_FILE - a list of (user_id, action_id, time) tuples:
             uid1 aid1 t1
             uid2 aid2 t2
             ...
        3) OUT_DIR - output directory, e.g. ".", "result", etc
        4) /tau1,px1,py1,q1/*times1 - repeat the algorithm with parameters 'tau1,px1,py1,q1' for 'times1' times, "*" means run repeatedly;
           /tau1,px1,py1,q1/*times1,/tau2,px2,py2,q2/*times2 -  repeat the algorithm with parameters 'tau1,px1,py1,q1' for 'times1' times, and then repeat with parameters 'tau2,px2,py2,q2' for 'times2' times
           Note: px or py can be 0, indicating not counting X or Y; times can be omitted.
      b) run the program with appropriate parameters;
      c) the results are printed every 100000 logs, consisting of 5 columns if px,py>0 (2 columns if either px or py = 0) and 20 rows:
	         raw X  estimated X	raw Y      estimated Y  estimated inf_prob
        

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published