- Make sure you have the requirements in
requirements.txtinstalled. To do this, just runpip install -r requirements.txtin your python environment. - For the C++ part, make sure you have Eigen library installed. Then run the following commands in the terminal :
g++ -o kmp kernelization.cpp -I/path/to/eigen -pthread -O3 g++ -O3 -shared -std=c++17 -fPIC -o avg_all_diff.so avg_all_diff.cpp
- Add your graph classification parameters in the
config.jsonfile. Some sample parameters are added, with variable descriptions. - Run the script
run_exp.py.
- The
parse_dataset.pycontains functions to parse files forhighschool, hospital, mit, workplacev2. You can add your own function to parse a new data from a file. run_exp_real.pywill perform the classification task of RE vs CM or EWLS vs CM. The usage for this function is as follows :wherepython run_exp_real.py dataset filepath exp_type num_perturb edge_swap time_swap diag_filterFor example,positional arguments: dataset Name of the dataset funtion in parse_datasets. filepath Path to the dataset file. exp_type Type of experiment : re or ewls. num_perturb Number of re/ewls perturbations. edge_swap Number of edge swaps for CM. time_swap Number of time swaps for CM. diag_filter Persistence threshold.You can runpython run_exp_real.py hospital data/detailed_list_of_contacts_Hospital.dat_ re 25 50 50 0python run_real_exp.py -hfor help.