Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/horacepan/MLGkernel
Implementation of the Multiscale Laplacian Graph Kernel
https://github.com/horacepan/MLGkernel
Last synced: about 1 month ago
JSON representation
Implementation of the Multiscale Laplacian Graph Kernel
- Host: GitHub
- URL: https://github.com/horacepan/MLGkernel
- Owner: horacepan
- License: gpl-3.0
- Created: 2016-12-05T20:35:47.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-11-21T15:42:44.000Z (about 5 years ago)
- Last Synced: 2024-08-01T17:28:14.152Z (4 months ago)
- Language: C++
- Size: 2.54 MB
- Stars: 17
- Watchers: 2
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-graph-classification - [C++ Reference
README
# The Multiscale Laplacian Graph Kernel
This is a C++ implementation of the Multiscale Graph Laplacian kernel as described in:
R. Kondor, H. Pan, [The Multiscale Graph Laplacian](https://arxiv.org/abs/1603.06186) (2016)## Requirements
* C++11
* [Eigen](http://eigen.tuxfamily.org/index.php)## Installation/Setup
Change the EIGENDIR variable Makefile.options to the path to your installation of
the Eigen library. Run the following command to create the runMLG executable in the MLGkernel directory.
```bash
make all
```## Run the demo
After compiling, you can run the sample.sh script, which will run the MLGkernel
on the sample datasets in the data directory and save the resulting kernel matrices in data/results.
```bash
sh sample.sh
```## Content
To understand the code, the main files worth skimming through are in the MLGkernel directory:
MLGdataset, Linearizer, FLGinstance, and FLGkernel.
See MLGkernel/runMLG.cpp for an example of how to load data/feature files and
how to compute/save the MLG kernel matrix.## Data Format
In order to use your own data, you have to provide the data via
* a text file in the following format: the first line is the number of graphs in the dataset
The next line is the number of vertices in first graph, the next {size of first graph} lines
is the space delimited adjacency matrix of the first graph. And so on for the rest of the graphs.
See data/MUTAG.txt for an example of this format.
* a text file containing a discrete node label of each graph for each graph in the dataset.
The first line is the number of graphs in the dataset. The second line is the size of the first
graph in the dataset. The next {size of first graph} lines denote the node labels of the vertices
of the first graph. And so on for the rest of the graphs.
See data/MUTAG_nodelabels.txt for an example of this data format.Note that if no feature file is given for the runMLG
executable, it will default to using vertex degrees as node labels.## Contact
If you have any questions/comments/concerns, please contact hopan[at]uchicago.edu. In particular,
it would be fantastic if you could report any bugs!