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.
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 on a real dataset are available as a Jupyter notebook:
experiments.ipynbReleased under the 3-clause BSD license.