# The tropical Torelli metric graph kernel

This repository contains source codes for experiments in the paper

> Metric Graph Kernels via the Tropical Torelli Map

# Package Dependence

The repository mainly depends on the following python libraries:

- [NetworkX](https://networkx.org/)
- [GraKeL](https://ysig.github.io/GraKeL/0.1a8/)
- [OSMnx](https://github.com/gboeing/osmnx)

## Usage

The repository is organized as follows:

- ``data`` contains the input data of all experiments. Due to the size limit we only put a sample of all datasets. To run ``URN_classify``, first run all cells in ``URN_data.ipynb`` to generate all URN datasets;

- ``figs`` contains all figures to display experimental results;

- ``results`` contains all experimental results;

- ``scripts`` contains the source codes of all experiments. Specifically,
    - ``benchmark_test.py`` contains codes for benchmark dataset comparison. To run the script, type ``python benchmark_test.py index_data index_kernel`` in the terminal;
    - ``time_test.py`` contains codes for computational time test;
    - ``URN_classify.py`` contains codes for URN classification. To run the script, type ``python URN_classify.py dataname kernelname gamma`` in the terminal.

- ``utils`` contains import modules for all experiments. 