Giter Club home page Giter Club logo

graph-gaussian-processes's Introduction

Matern Gaussian Processes on Graphs

This repo provides an extension for gpflow with Matérn kernels, inducing variables and trainable models implemented for graphs. Easily integrated with the rest of gpflow functionality, it allows one to run GP regression and classification problems on graphs. See examples notebooks and docstrings for how-to guides/documentation.

Installation

Minimal installation is performed by typing

pip install -e .

in your terminal inside the cloned repo directory.

To run example notebooks, install the dependencies with

pip install -e .[examples]

On Windows, we recommend using Windows Subsystem for Linux (WSL).

Library usage

A rough outline of how to use the library is as follows:

>>> from graph_matern.kernels.graph_matern_kernel import GraphMaternKernel
>>> laplacian = nx.laplacian_matrix(G)  # G is a networkx Graph
>>> eigenvalues, eigenvectors = tf.linalg.eigh(laplacian)  # only should be done once-per-graph
>>> kernel = GraphMaternKernel((eigenvectors, eigenvalues))
>>> model = gpflow.models.GPR(data=data, kernel=kernel)

Note that one is not constrained to use GPR as a model, check out our example notebooks for a more detailed how-to.

Examples

Notebook with topic classification for citation networks on the CORA dataset [1] is

jupyter notebook examples/classification.ipynb

Notebook with primitive regression on PEMS data [2] is

jupyter notebook examples/regression.ipynb

The data in examples/data is third-party, and only provided in the repo to facilitate running the examples.

Citation

@inproceedings{borovitskiy2021matern,
      title={Matern Gaussian Processes on Graphs}, 
      author={Viacheslav Borovitskiy and Iskander Azangulov and Alexander Terenin and Peter Mostowsky and Marc Peter Deisenroth and Nicolas Durrande},
      booktitle={International Conference on Artificial Intelligence and Statistics},
      year={2021},
      organization={PMLR}
}

graph-gaussian-processes's People

Contributors

imbirik avatar stoprightthere avatar thomaspinder avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.