DOI: 10.6084/m9.figshare.5411341
title: Survival Factorization Framework source code and data

description: <br>This dataset contains the source code for the Survival Factorization Framework published as:<br>Nicola Barbieri, Giuseppe Manco, Ettore Ritacco: <b>Survival Factorization on Diffusion Networks</b>. THE EUROPEAN CONFERENCE ON MACHINE LEARNING & PRINCIPLES AND PRACTICE OF KNOWLEDGE DISCOVERY IN DATABASES, 2017. <br>The dataset is in .zip format that can be uncompressed by standard and openly accessible file zip utilities. Code is stored in .java and .jar files that can be accessed and edited by standard and openly accessible text edit software. Testing and training datasets containing Users and Cascade Timestamps are available in various text file formats. Figures and tables from the related publication are included in .pdf format. <br>See the description below for more detail on file formats and instructions on building the model and Network Reconstruction.<br>In the related paper we propose a survival factorization framework that models information cascades by tying together social influence patterns, topical structure and temporal dynamics. This is achieved through the introduction of a latent space which encodes: (a) the relevance of a information cascade on a topic; (b) the topical authoritativeness and the susceptibility of each individual involved in the information cascade, and (c) temporal topical patterns. By exploiting the cumulative properties of the survival function and of the likelihood of the model on a given adoption log, which records the observed activation times of users and side-information for each cascade, we show that the inference phase is linear in the number of users and in the number of adoptions. The evaluation on both synthetic and real-world data shows the effectiveness of the model in detecting the interplay between topics and social influence patterns, which ultimately provides high accuracy in predicting users activation times.<br><br>###############################<br>How to Build the Model:<br>Run <b>survivalFactorizationEM.SurvivalFactorizationEM_Runner</b> providing a path of a configuration file. Given a dataset, this script generates several instances of class <b>survivalFactorizationEM.SurvivalFactorizationEM_Model</b>.The configuration file must to be written according to the .”properties” syntax. The fields are:<br> n_factors = output = max_iterations = assignment_file = event_file = [ content_file = ]<br>where<br>: an integer list separated by “;” e.g. n_factors = 2;4;8;16;32;64;128This list sets the number of models to build, one for each number of factors.<br>: a String e.g. output = resources/datasets/synth/models/SynthThis string contains two elements: - the path of folder where the built models (in the example “resources/datasets/synth/models”) will be stored - the prefix of the name of the file which will contain the model (in the example “Synth”).For each topic number in , a model, with the corresponding number of factors, will be created and will be stored in the folder; the name of the model file is a concatenation of the prefix + “_” + + “.model”<br>: an integer e.g. max_iterations = 1000The fix point iterations will continue until convergence or when this number (burn-in phase included) is reached<br>: a String e.g. assignment_file = resources/datasets/synth/models/SynthThis field is similar to . Each assignment file will contain the association cascade - topic for each cascade<br>: a String e.g. event_file = resources/datasets/Synth/cascades_training.txtThe name of a file containing the cascades of events (e.g. tweets) exploited to build the model<br>: a String e.g. event_file = resources/datasets/Synth/text_training.txtThe name of a file containing the text information for each cascade. Note: this field is optional<br><br>###############################<br>Cascade file format. A text document containing this information:<br>NodeId CascadeId TimeStamp1449 1 12222549820006930 1 12222778660002466 2 1222281238000…<br>Each row is an activation, the separator is the tab character “\t”<br><br>###############################<br>Text file format. A text document containing this information:<br>WordId CascadeId Frequency1248 1 1804 1 56788 2 38134 2 1…<br>Each row is an word in an event, the separator is the tab character “\t”<br><br>###############################<br>How to perform the Network Reconstruction:<br>Run <b>survivalFactorizationEM.FullTestNetworkReconstruction</b> providing a path of a configuration file. Given a folder containing built models and a test network, this script will generate the network reconstruction for each model. The configuration file must to be written according to the .”properties” syntax. The fields are:<br>model_folder = model_files = test_file = output_folder = output_files = <br>where:<br>: a String e.g. model_folder = resources/datasets/synth/modelsThe folder containing the built models<br>: a String list whose elements are separated by “;” e.g. model_files = Synth_2f.model;Synth_4f.model;Synth_8f.model;Synth_16f.model;Synth_32f.model;Synth_64f.model;Synth_128f.modelThis list contains the file names where the models are stored<br>: a String e.g. test_file = resources/datasets/Synth/s2/links_reduced-FF1400.remapped_two_hopsThe file containing the test network to reconstruct. Note: the syntax of the test file is equal to the Cascade file format.<br>: a String e.g. output_folder = resources/datasets/Synth/predsThe folder where to put the reconstructed network files (one for each model)<br>: a String list whose elements are separated by “;” e.g. output_files = Synth_2f.pred;Synth_4f.pred;Synth_8f.pred;Synth_16f.pred;Synth_32f.pred;Synth_64f.pred;Synth_128f.predThe file names of the reconstructed networks<br><br>###############################<br>Network reconstruction output prediction file format.<br>Prediction ActualClass1.15421803E-6 12.27729428E-6 11.16779013E-7 2…<br>Each row is a prediction, the separator is the tab character “\t”