Repo that builds up on the libgraph and uses the GEDLIB to create edit paths between two pairs of graphs from different sources.
See INSTALLATION.md for all dependencies and detailed setup instructions.
Use the provided experiment.sh script to run all experiments:
chmod u+x experiment.sh
./experiment.sh -db MUTAG- Download a dataset from TUDortmund or use your own graphs in the same format in the
Data/Graphs/folder.
mkdir build
cd build
cmake ..
make -j 6./create_edit_mappings \
-db MUTAG \
-raw ../Data/Graphs/ \
-processed ../Data/ProcessedGraphs/ \
-mappings ../Results/Mappings/ \
-t 30 \
-method F2 \
-cost CONSTANT \
-seed 42 \
-num_graphs 5000Main arguments:
-db <database name>: Name of the dataset (e.g., MUTAG)-raw <raw data path>: Path to raw graph data-processed <processed data path>: Path to store processed graphs-mappings <output path>: Path to store mappings (now inResults/Mappings/)-t <threads>: Number of threads-method <method>: GED method (e.g., REFINE, F2)-cost <cost>: Edit cost type (e.g., CONSTANT)-seed <seed>: Random seed-num_graphs <N>: Number of graph pairs (optional)
Output files:
- After running, you will find the following files in
../Results/Mappings/<METHOD>/<DB>/:<DB>_ged_mapping.bin: Binary file containing the computed graph edit distance mappings (used for further processing).<DB>_ged_mapping.csv: CSV file with meta information in a human-readable format (for inspection, analysis, or use in other tools).graph_ids.txt: The list of graph pairs for which mappings were computed.
mkdir build
cd build
cmake ..
make -j 6./create_edit_paths \
-db MUTAG \
-processed ../Data/ProcessedGraphs/ \
-mappings ../Results/Mappings/REFINE/MUTAG/ \
-num_mappings 1000 \
-t 1Output files:
- After running, you will find the following files in
../Results/Paths/<METHOD>/<DB>/:<DB>_edit_paths.bin: Binary file containing the computed edit paths (used for further processing).<DB>_edit_paths.csv: CSV file with edit path information in a human-readable format (for inspection, analysis, or use in other tools).
Main arguments:
-db <database name>: Name of the dataset-processed <processed data path>: Path to processed graphs-mappings <mappings path>: Path to mappings (now inResults/Mappings/REFINE/<DB>/)-t <threads>: Number of threads
(Instructions for this step can be added here if needed.)
You need GUROBI 12.0.3 installed and properly configured. See GUROBI 12.0.3 Installation.