Skip to main content

A scikit-learn compatible library for graph kernels

Project description

GraKeL: A library for graph kernels

GraKeL is a library compatible with the project of scikit-learn

Installation

The GraKeL library requires:

  • Python (>=2.7, >=3.5)
  • NumPy (>=1.8.2)
  • SciPy (>=0.13.3)
  • Cython (>=0.27.3)
  • cvxopt (>=1.2.0) [optional: lovasz]
  • future (>=0.16.0) (for python 2.7)

Installing Dependencies

You can install the dependencies as follows:

$ pip install extension>=extension_version

or

$ pip install -r requirements.txt

Installing the development-version

To install the development-version using pip execute:

$ pip install grakel-dev

Getting Started

Two pointers to get you started:

Testing

You first need to build the package's c++ extensions locally by executing:

$ python setup.py build_ext -i

To test the package, execute:

$ nosetests

For executing unit_tests or use a testing-interface for testing the kernel module:

$ python  grakel/tests/test_kernels.py --help
usage: test_kernels.py [-h] [--verbose] [--problematic] [--slow]
                       [--ignore_warnings] [--dataset DATASET] [--normalize]
                       [--develop | --all | --main]

A test file for all kernels

optional arguments:
  -h, --help         show this help message and exit
  --verbose          print kernels with their outputs on stdout
  --problematic      allow execution of problematic test cases in development
  --slow             allow execution of slow test cases in development
  --ignore_warnings  ignore warnings produced by kernel executions
  --dataset DATASET  chose the datset you want the tests to be executed
  --normalize        normalize the kernel output
  --develop          execute only tests connected with current development
  --all              execute all tests
  --main             execute the main tests [default]

For testing graph_kernels:

$ python grakel/tests/test_graph_kernel.py --help
usage: test_graph_kernels.py [-h] [--verbose] [--problematic] [--slow]
                             [--normalize] [--ignore_warnings]
                             [--dataset DATASET] [--develop | --all | --main]

A test file for all kernels

optional arguments:
  -h, --help         show this help message and exit
  --verbose          print kernels with their outputs on stdout
  --problematic      allow execution of problematic test cases in development
  --slow             allow execution of slow test cases in development
  --normalize        normalize the kernel output
  --ignore_warnings  ignore warnings produced by kernel executions
  --dataset DATASET  chose the datset you want the tests to be executed
  --develop          execute only tests connected with current development
  --all              execute all tests
  --main             execute the main tests [default]

And for testing the Graph class:

$ python grakel/tests/test_graph.py --help
usage: test_graph.py [-h] [--verbose] [--ignore_warnings]

A test file for all `Graph` type objects

optional arguments:
  -h, --help         show this help message and exit
  --verbose          verbose outputs on stdout
  --ignore_warnings  ignore warnings produced by kernel executions

You can also execute the kernel test locally through a test-main-function as

$ python -m grakel.tests

Contributing

To learn how to integrate your own kernel and how to contribute to the GraKeL project, please read the sections Write your own kernel and Contributing in the Documentation, respectively.

License

GraKeL comes with a BSD 3-clause license (as with scikit-learn). It contains the C++ source code of BLISS (a library for graph isomorphism) which is LGPL licensed. Futhermore its optional dependency in the package of cvxopt (a tool for solving convex-optimization problems) comes with a GPL license.

Citation

If you use GraKeL in a scientific publication, please cite our paper:

@article{siglidis2018grakel,
  title={GraKeL: A Graph Kernel Library in Python},
  author={Siglidis, Giannis and Nikolentzos, Giannis and Limnios, Stratis and Giatsidis, Christos and Skianis, Konstantinos and Vazirgiannis, Michalis},
  journal={arXiv preprint arXiv:1806.02193},
  year={2018}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for grakel, version 0.1a6
Filename, size File type Python version Upload date Hashes
Filename, size grakel-0.1a6-cp27-cp27m-manylinux1_i686.whl (1.3 MB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp27-cp27m-manylinux1_x86_64.whl (1.6 MB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp27-cp27m-manylinux2010_i686.whl (1.3 MB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp27-cp27m-manylinux2010_x86_64.whl (1.6 MB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp27-cp27mu-manylinux1_i686.whl (1.3 MB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp27-cp27mu-manylinux1_x86_64.whl (1.6 MB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp27-cp27mu-manylinux2010_i686.whl (1.3 MB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp27-cp27mu-manylinux2010_x86_64.whl (1.6 MB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp35-cp35m-macosx_10_6_intel.whl (898.8 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp35-cp35m-manylinux1_i686.whl (1.3 MB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp35-cp35m-manylinux1_x86_64.whl (1.6 MB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp35-cp35m-manylinux2010_i686.whl (1.3 MB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp35-cp35m-manylinux2010_x86_64.whl (1.6 MB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp36-cp36m-macosx_10_6_intel.whl (916.4 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp36-cp36m-manylinux1_i686.whl (1.3 MB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp36-cp36m-manylinux1_x86_64.whl (1.7 MB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp36-cp36m-manylinux2010_i686.whl (1.3 MB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp36-cp36m-manylinux2010_x86_64.whl (1.7 MB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp37-cp37m-macosx_10_6_intel.whl (900.0 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp37-cp37m-manylinux1_i686.whl (1.3 MB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp37-cp37m-manylinux1_x86_64.whl (1.7 MB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp37-cp37m-manylinux2010_i686.whl (1.3 MB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size grakel-0.1a6-cp37-cp37m-manylinux2010_x86_64.whl (1.7 MB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size grakel-0.1a6.zip (1.1 MB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page