GithubHelp home page GithubHelp logo

jsnagai / hermitian_laplacian_graph Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eriklundin98/hermitian_laplacian_graph

0.0 0.0 0.0 3.31 MB

Node embedding extraction using GraphWave and the Hermitian Laplacian

Python 16.37% Jupyter Notebook 83.63%

hermitian_laplacian_graph's Introduction

Implementation of "Graph Signal Processing for Directed Graphs based on the Hermitian Laplacian"

This repository contains an unofficial implementation of

Graph signal processing for directed graphs based on the Hermitian Laplacian.

Furutani, S., Shibahara, T., Akiyama, M., Hato, K., & Aida, M.

Joint European Conference on Machine Learning and Knowledge Discovery in Databases.

[Paper]

For details, please see the original paper, or this brief explanation. A simple use case is provided in demo.ipynb

Embeddings are generated for a networkx graph through the get_embeddings function:

embeddings = get_embeddings(
    A, # networkx graph or numpy matrix
    S, # list of scales
    T, # list of sampling points
    q, # rotation parameter
    kernel, # a kernel function. Can be a custom function or lib.heat_kernel | low_pass_filter_kernel
    **kernel_args # parameters supplied to the kernel
)

An example using the same parameters as the authors, with an undirected and unweighted graph:

from lib import get_embeddings, low_pass_filter_kernel

import numpy as np
import networkx as nx

G = nx.karate_club_graph()
# parameters used in paper
S = np.arange(2.0, 20.1, 0.1) 
T = np.arange(1, 11, 1) 
q = 0.02
kernel = low_pass_filter_kernel
c = 2

embeddings = get_embeddings(
    A=G,
    S=S,
    T=T,
    q=q,
    kernel=kernel,
    c=2
)

See this youtube clip for a brief explanation of how GraphWave works - they use the graph Laplacian, which only works for undirected graphs and is replaced by the Hermitian Laplacian by Furutani et al.

See Wikipedia for an explanation of laplacian matrices

hermitian_laplacian_graph's People

Contributors

eriklundin98 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.