Weighted spectral embedding
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
example.ipynb
experiments.ipynb
spectral_embedding.py

README.md

spectral_embedding

Weighted spectral embedding of graphs

This repository contains the implementation in Python of weighted spectral embedding, as described in the paper:

Weighted spectral embedding of graphs, by Thomas Bonald, Alexandre Hollocou, Marc Lelarge, Allerton 2018.

Getting started

from spectral_embedding import *

spectral = SpectralEmbedding()

Import a toy graph:

import networkx as nx

graph = nx.karate_club_graph()
adjacency = nx.to_scipy_sparse_matrix(graph)

Spectral embedding

spectral.fit(adjacency)
embedding = spectral.embedding_

Experiments

Experiments on a real dataset are available as a Jupyter notebook:

experiments.ipynb

License

Released under the 3-clause BSD license.