Skip to main content

Graph algorithms

Project description

logo sknetwork https://img.shields.io/pypi/v/scikit-network.svg https://github.com/sknetwork-team/scikit-network/actions/workflows/ci_checks.yml/badge.svg Documentation Status https://codecov.io/gh/sknetwork-team/scikit-network/branch/master/graph/badge.svg https://img.shields.io/pypi/pyversions/scikit-network.svg

Free software library in Python for the analysis of large graphs:

  • Memory-efficient representation of graphs as sparse matrices in scipy format

  • Fast algorithms

  • Simple API inspired by scikit-learn

Resources

Quick Start

Install scikit-network:

$ pip install scikit-network

Import scikit-network:

import sknetwork

Documentation

The documentation is structured as follows:

  • Getting started: First steps to install, import and use scikit-network.

  • Reference: Description of each function and object of scikit-network.

  • Tutorials: Application of the main tools to toy examples.

  • Use cases: More advanced examples combining several tools on specific use cases.

  • About: Authors, history of the library, how to contribute, index of functions and objects.

Citing

If you want to cite scikit-network, please refer to the publication in the Journal of Machine Learning Research:

@article{JMLR:v21:20-412,
  author  = {Thomas Bonald and Nathan de Lara and Quentin Lutz and Bertrand Charpentier},
  title   = {Scikit-network: Graph Analysis in Python},
  journal = {Journal of Machine Learning Research},
  year    = {2020},
  volume  = {21},
  number  = {185},
  pages   = {1-6},
  url     = {http://jmlr.org/papers/v21/20-412.html}
}

History

0.29.0 (2023-03-30)

  • Change API for clustering (predict / transform)

  • Change API for classification (seeds -> labels)

  • Change API for ranking (seeds -> weights)

  • Change API for GNN (same as classifiers)

  • Remove first order methods for link prediction

  • Add nearest neighbor methods for link prediction

  • Add KNN classifier without embedding

  • Add TF-IDF

  • Solve security issues by upgrade of wheels and ipython

0.28.3 (2023-01-06)

  • Drop Python 3.7

  • Update Numpy requirement

0.28.2 (2022-11-30)

  • Allow Python 3.7, by Thomas Bonald

  • Fix input format for KMeans, issue #548 raised by @sgerbe

0.28.1 (2022-11-22)

  • Fix sampling for GraphSage, by Simon Delarue

  • Fix leakage on GNNs, by Thomas Bonald and Simon Delarue

  • Update tutorial on GNNs with node inference, by Thomas Bonald and Simon Delarue

0.28.0 (2022-11-16)

  • Update Graph neural networks (e.g., add GraphSAGE), by Simon Delarue

  • Clean data home folder (set one folder per dataset collection, NetSet, Konect, …), by Thomas Bonald

  • Improve classification by diffusion, setting -1 to unreached nodes, by Thomas Bonald

  • Fix bug on modularity, raised by Alessandro (#543)

  • Clean up source distribution, by Nicholas Bollweg (#544)

  • Safe file extraction, by TrellixVulnTeam

  • Fix bug on dendrogram cut, raised by Nina Sachdev (#546)

  • Add a function to aggregate a graph per label, by Thomas Bonald

0.27.1 (2022-07-29)

  • Fix documentation

0.27.0 (2022-07-29)

  • Drop Python 3.7

  • Update NumPy and SciPy requirements

  • Add graph neural networks, by Simon Delarue (#533)

  • Add fit_predict / fit_transform where appropriate, by Thomas Bonald

  • Add Louvain hierarchical clustering (bottom-up), by Thomas Bonald

  • Improve classification by diffusion (vectorial), by Thomas Bonald

  • Add F1 scores for classification, by Thomas Bonald

  • Add cosine similarity metric for embeddings, by Thomas Bonald

  • Add acyclic test for undirected graphs, by Thomas Bonald

  • Update algorithms to accept all sparse matrix formats of scipy, by Thomas Bonald

0.26.0 (2022-05-03)

  • Add module on regression, by Thomas Bonald

  • Add connected components for bipartite graphs, by Thomas Bonald

  • Update functions for loading graphs, by Thomas Bonald

  • Fix shuffling nodes in Louvain (issue #521), by Thomas Bonald

  • Add radius and eccentricity metrics, by Henry Carscadden (#522)

  • Add new use case (recommendation), by Thomas Bonald

0.25.0 (2022-03-15)

  • Add use cases as notebooks, by Thomas Bonald

  • Add list/dict of neighbors for building graphs, by Thomas Bonald

  • Update Spectral embedding, by Thomas Bonald

  • Update Block models, by Thomas Bonald (#507)

  • Fix Tree sampling divergence, by Thomas Bonald (#505)

  • Allow parsers to return weighted graphs, by Thomas Bonald

  • Add Apple Silicon and Python 3.10 wheels, by Quentin Lutz (#503)

0.24.0 (2021-07-27)

  • Merge Bi* algorithms (e.g., BiLouvain -> Louvain) by Thomas Bonald (#490)

  • Transition from Travis to Github actions by Quentin Lutz (#488)

  • Added sdist build for conda recipes

  • Added name position for graph visualization

  • Removed randomized algorithms

0.23.1 (2021-04-24)

  • Updated NumPy and SciPy requirements

0.23.0 (2021-04-23)

  • New push-based implementation of PageRank by Wenzhuo Zhao (#475)

  • Fixed cut_balanced in hierarchy

  • Dropped Python 3.6, wheels for Python 3.9 (switched to manylinux2014)

0.22.0 (2021-02-09)

  • Added hierarchical Louvain embedding by Quentin Lutz (#468)

  • Doc fixes and updates

  • Requirements update

0.21.0 (2021-01-29)

  • Added random projection embedding by Thomas Bonald (#461)

  • Added PCA-based embedding by Thomas Bonald (#461)

  • Added 64-bit support for Louvain by Flávio Juvenal (#450)

  • Added verbosity options for dataset loaders

  • Fixed Louvain embedding

  • Various doc and tutorial updates

0.20.0 (2020-10-20)

  • Added betweenness algorithm by Tiphaine Viard (#444)

0.19.3 (2020-09-17)

  • Added Louvain-based embedding

  • Fix documentation with new dataset website URLs

0.19.2 (2020-09-14)

  • Fix documentation with new dataset website URLs.

0.19.1 (2020-09-09)

  • Fix visualization features

  • Fix documentation

0.19.0 (2020-09-02)

  • Added link prediction module

  • Added pie-node visualization of memberships

  • Added Weisfeiler-Lehman graph coloring by Pierre Pebereau and Alexis Barreaux (#394)

  • Added Force Atlas 2 graph layout by Victor Manach and Rémi Jaylet (#396)

  • Added triangle listing algorithm for directed and undirected graph by Julien Simonnet and Yohann Robert (#376)

  • Added k-core decomposition algorithm by Julien Simonnet and Yohann Robert (#377)

  • Added k-clique listing algorithm by Julien Simonnet and Yohann Robert (#377)

  • Added color map option in visualization module

  • Updated NetSet URL

0.18.0 (2020-06-08)

  • Added Katz centrality

  • Refactor connectivity module into paths and topology

  • Refactor Diffusion into Dirichlet

  • Added parsers for adjacency list TSV and GraphML

  • Added shortest paths and distances

0.17.0 (2020-05-07)

  • Add clustering by label propagation

  • Add models

  • Add function to build graph from edge list

  • Change a parameter in SVG visualization functions

  • Minor corrections

0.16.0 (2020-04-30)

  • Refactor basics module into connectivity

  • Cython version for label propagation

  • Minor corrections

0.15.2 (2020-04-24)

  • Clarified requirements

  • Minor corrections

0.15.1 (2020-04-21)

  • Added OpenMP support for all platforms

0.15.0 (2020-04-20)

  • Updated ranking module : new pagerank solver, new HITS params, post-processing

  • Polynomes in linear algebra

  • Added meta.name attribute for Bunch

  • Minor corrections

0.14.0 (2020-04-17)

  • Added spring layout in embedding

  • Added label propagation in classification

  • Added save / load functions in data

  • Added display edges parameter in svg graph exports

  • Corrected typos in documentation

0.13.3 (2020-04-13)

  • Minor bug

0.13.2 (2020-04-13)

  • Added wheels for multiple platforms (OSX, Windows (32 & 64 bits) and many Linux) and Python version (3.6/3.7/3.8)

  • Documentation update (SVG dendrograms, tutorial updates)

0.13.1a (2020-04-09)

  • Minor bug

0.13.0a (2020-04-09)

  • Changed from Numba to Cython for better performance

  • Added visualization module

  • Added k-nearest neighbors classifier

  • Added Louvain hierarchy

  • Added predict method in embedding

  • Added soft clustering to clustering algorithms

  • Added soft classification to classification algorithms

  • Added graphs in data module

  • Various API change

0.12.1 (2020-01-20)

  • Added heat kernel based node classifier

  • Updated loaders for WikiLinks

  • Fixed file-related issues for Windows

0.12.0 (2019-12-10)

  • Added VerboseMixin for verbosity features

  • Added Loaders for WikiLinks & Konect databases

0.11.0 (2019-11-28)

  • sknetwork: new API for bipartite graphs

  • new module: Soft node classification

  • new module: Node classification

  • new module: data (merge toy graphs + loader)

  • clustering: Spectral Clustering

  • ranking: new algorithms

  • utils: K-neighbors

  • hierarchy: Spectral WardDense

  • data: loader (Vital Wikipedia)

0.10.1 (2019-08-26)

  • Minor bug

0.10.0 (2019-08-26)

  • Clustering (and related metrics) for directed and bipartite graphs

  • Hierarchical clustering (and related metrics) for directed and bipartite graphs

  • Fix bugs on embedding algorithms

0.9.0 (2019-07-24)

  • Change parser output

  • Fix bugs in ranking algorithms (zero-degree nodes)

  • Add notebooks

  • Import algorithms from scipy (shortest path, connected components, bfs/dfs)

  • Change SVD embedding (now in decreasing order of singular values)

0.8.2 (2019-07-19)

  • Minor bug

0.8.1 (2019-07-18)

  • Added diffusion ranking

  • Minor fixes

  • Minor doc tweaking

0.8.0 (2019-07-17)

  • Changed Louvain, BiLouvain, Paris and PageRank APIs

  • Changed PageRank method

  • Documentation overhaul

  • Improved Jupyter tutorials

0.7.1 (2019-07-04)

  • Added Algorithm class for nicer repr of some classes

  • Added Jupyter notebooks as tutorials in the docs

  • Minor fixes

0.7.0 (2019-06-24)

  • Updated PageRank

  • Added tests for Numba versioning

0.6.1 (2019-06-19)

  • Minor bug

0.6.0 (2019-06-19)

  • Largest connected component

  • Simplex projection

  • Sparse Low Rank Decomposition

  • Numba support for Paris

  • Various fixes and updates

0.5.0 (2019-04-18)

  • Unified Louvain.

0.4.0 (2019-04-03)

  • Added Louvain for directed graphs and ComboLouvain for bipartite graphs.

0.3.0 (2019-03-29)

  • Updated clustering module and documentation.

0.2.0 (2019-03-21)

  • First real release on PyPI.

0.1.1 (2018-05-29)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scikit-network-0.29.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

scikit_network-0.29.0-cp310-cp310-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.10Windows x86-64

scikit_network-0.29.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

scikit_network-0.29.0-cp310-cp310-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

scikit_network-0.29.0-cp310-cp310-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

scikit_network-0.29.0-cp39-cp39-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.9Windows x86-64

scikit_network-0.29.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

scikit_network-0.29.0-cp39-cp39-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

scikit_network-0.29.0-cp39-cp39-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

scikit_network-0.29.0-cp38-cp38-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.8Windows x86-64

scikit_network-0.29.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

scikit_network-0.29.0-cp38-cp38-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

scikit_network-0.29.0-cp38-cp38-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

Details for the file scikit-network-0.29.0.tar.gz.

File metadata

  • Download URL: scikit-network-0.29.0.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for scikit-network-0.29.0.tar.gz
Algorithm Hash digest
SHA256 174e9711470962fc021b486a07e7ce179df6f0716cbe7d34890fbc5335473abb
MD5 cfdfce760dcf6af8af942c92c2fe0024
BLAKE2b-256 eec6c1e81437a72b45594bf6ea3b40dcba57ae823a886807f9eaf14cd73fc63e

See more details on using hashes here.

File details

Details for the file scikit_network-0.29.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_network-0.29.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 97718c91e409e7ae2ad4537fc90883eeb0aef34426e4c63cb7bc99be9e3de12b
MD5 00620a5ff3a4c6924bd7ef413e2f2478
BLAKE2b-256 181c5b717093d68b7bbd26544e5884affc06718d0cce2e1081344d75e9b0b703

See more details on using hashes here.

File details

Details for the file scikit_network-0.29.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scikit_network-0.29.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 19de6a872e2fd8aa3d8ace83970662df00775b622f3cfd162a374f527411edcb
MD5 f101b99aca3ec68a5754a4b579d990cc
BLAKE2b-256 34e87eeb5a9d8eeda2ada79e8939b5c5cc32219664cb83bdedb95f989bbdee24

See more details on using hashes here.

File details

Details for the file scikit_network-0.29.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_network-0.29.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b3d8a443d17fc8919696284bd42502dae4b2cb9f98a6727e5b60f1cd07fe047b
MD5 5c7ae7aeaa93e174ac18294ec5542881
BLAKE2b-256 bc2b841641958e31c3441cc6b5bd29500d7648132af8f1c35b06c5d7e4ff7692

See more details on using hashes here.

File details

Details for the file scikit_network-0.29.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for scikit_network-0.29.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 acfd2e2eee41fe80ba8fd7f6917e252c0d5282f1d784157768abf81588fac60c
MD5 1085967587518c6f11a52a8a7fcc1438
BLAKE2b-256 7f95d3b450dece7a91228af84b44f480fc5010dd45f3a2399b3f4066736ee53a

See more details on using hashes here.

File details

Details for the file scikit_network-0.29.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_network-0.29.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 82ea0a9c8dbdc286ad0522ac6f6062dbefcce948a48061143582c539326ab671
MD5 fe45c04b55aa987678b8ec4390fd53f7
BLAKE2b-256 ba1ea7b4b33d1efb2cfc75b06154fde605c592dca8aa625941af028e93d58649

See more details on using hashes here.

File details

Details for the file scikit_network-0.29.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scikit_network-0.29.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 500389872dca153a7b450d13151f3b0dc6454f9570fc8c9f256c984ebbe10c9c
MD5 6201a59e5a83cebfd649da95f7b28005
BLAKE2b-256 73b835a889240c4df1c9bb64b9dfb2ac1bab44b4576193c91a99fbd5f059e965

See more details on using hashes here.

File details

Details for the file scikit_network-0.29.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_network-0.29.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 21c8e7265a3825de2d226d59b3958f5d8c552b808136dfa734c8f46ac4f7fda2
MD5 82387197631ba9a1fcce85d74ea6c20e
BLAKE2b-256 bf2658aee4bbd2dc4a4b64d13cc9edabc41909019c258f222f6204c320dd7410

See more details on using hashes here.

File details

Details for the file scikit_network-0.29.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for scikit_network-0.29.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e5fd968ffc0fea6f6876cdef205faffcfb4b10cef8faf9ebfe9ae7c5e01f392c
MD5 4170215cbe4bf8ce6e7f99e1d0eb0359
BLAKE2b-256 81c909625212387ea58e7733245fc85390d93d5daaa0c76de0b0db3fb519d007

See more details on using hashes here.

File details

Details for the file scikit_network-0.29.0-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_network-0.29.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d3f81566031c804d42e34340ec6631871e3e3be52eb0b6010cba26d9c84904aa
MD5 bbe6d4ddf927ab62f58181f7da1d4258
BLAKE2b-256 065c3af849051b89f2b0c392be9b4aae1a4f2d5ec09cfe0a2b3d12d4192459bd

See more details on using hashes here.

File details

Details for the file scikit_network-0.29.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scikit_network-0.29.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dce1ffaa0da1f58d4f843828e45b34c6701918cd1c03892a15033d7ca7bfa2a1
MD5 f4c57eb75c27d01d2c82b0638d5daa0d
BLAKE2b-256 53132d2577507a55d8872a8317a92ede0f45a4e8f07a12469816dd1ad09571e5

See more details on using hashes here.

File details

Details for the file scikit_network-0.29.0-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_network-0.29.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 870ea7d7e7e60d8fbd0ea18210584b6cad7d0450480e4325ffed9921cc5e4d06
MD5 4765e96ea8a8f690290750ef50323ed0
BLAKE2b-256 b9c9c8d3860143b004789f6326ccd18ed603fe3ce2a239fc34ce833fcf226478

See more details on using hashes here.

File details

Details for the file scikit_network-0.29.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for scikit_network-0.29.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5738cd107c727e50438d716d7ccb523878eb6f345019db22ae9cf295dc0f8f7c
MD5 a964bd7fd474c541180e6b5e74cc1ecc
BLAKE2b-256 2d1a6d9e41b019305cbac3e1b25b524ecb44cfbca2482bdef843d7b6a835afd6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page