Skip to content

tbonald/spectral_embedding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Weighted spectral embedding

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published