Skip to main content

GRaphlet-orbit ADjacency COunter (GRADCO).

Project description

https://badge.fury.io/py/gradco.svg https://img.shields.io/pypi/dm/gradco.svg?label=PyPI%20downloads) https://img.shields.io/badge/DOI-10.48550/arXiv.2405.14194-blue

Introduction

This is our alpha-version of GRADCO, our general purpose counter that can output graphlet degree vectors (GDVs), edge graphlet degree vectors, graphlet adjacency matrices, edge orbit adjacency matrices and node orbit adjacency matrices. GRADCO is part of our submission ‘Graphlets correct for the topological information missed by random walks’ (DOI:10.48550/arXiv.2405.14194), in which we formally define the topological information that is implicitly captured by random walks in terms of orbit adjacencies (i.e., the co-occurence of nodes on symmetric positions within graphlets). We mathematically prove random walks miss various orbit adjacencies and illustrate that these orbit adjacencies have real-world value in a multiclass label prediction setting. If you use GRADCO, please cite our paper.

Quick start guide

We are working on improving the documentation. For now, we provide the example code below to illustrate how to use our counter, GRADCO.

import gradco as gradco
import networkx as nx
from scipy.sparse import csr_array


def main():

    # generate a random graph
    n = 1000
    m = 10
    G = nx.barabasi_albert_graph(n, m, seed=42)
    A = nx.to_scipy_sparse_array(G)

    # create GRADCO counter object
    counter = gradco.Counter(A)

    # count the orbit adjacency matrices
    counter.count()

    # iterate over the orbit adjacencies
    for hop, o1, o2, A in counter.generate_orbit_adjacencies():
        print("O:", hop, o1, o2)

    # iterate the graphlet adjacencies
    for graphlet, A in enumerate(counter.generate_graphlet_adjacencies()):
        print("GA:", graphlet)

    # get the graphlet degree vectors
    GDV = counter.get_GDVs()

    # get the edge graphlet degree vectors
    eGDV = counter.get_edge_GDVs()

    # get the edge orbit adjacency matrices
    for e, A in enumerate(counter.generate_edge_orbit_adjacencies()):
        print("EA:", e)

Roadmap

We forsee the following steps to take GRADCO from alpha to full release:

  • set up a GitHub workflow to automatically compile and test the code

  • set up a GitHub workflow to automatically deploy the code to PyPI

  • add windows to the precompiled wheels

  • add a bug report template

  • add docs

  • upgrade to numpy 2.0

  • sync versioning and pypi versioning

In the future, we plan to add the following features:

  • speed up the counter

  • reduce the memory footprint

  • add larger graphlets

The best way to support our project is to cite our paper.

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

gradco-0.1.7.tar.gz (214.7 kB view details)

Uploaded Source

Built Distributions

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

gradco-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (359.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

gradco-0.1.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (356.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

gradco-0.1.7-cp312-cp312-macosx_11_0_arm64.whl (43.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

gradco-0.1.7-cp312-cp312-macosx_10_9_x86_64.whl (44.2 kB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

gradco-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (358.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

gradco-0.1.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (355.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

gradco-0.1.7-cp311-cp311-macosx_11_0_arm64.whl (43.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

gradco-0.1.7-cp311-cp311-macosx_10_9_x86_64.whl (44.2 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

gradco-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (358.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

gradco-0.1.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (355.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

gradco-0.1.7-cp310-cp310-macosx_11_0_arm64.whl (43.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

gradco-0.1.7-cp310-cp310-macosx_10_9_x86_64.whl (44.2 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file gradco-0.1.7.tar.gz.

File metadata

  • Download URL: gradco-0.1.7.tar.gz
  • Upload date:
  • Size: 214.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for gradco-0.1.7.tar.gz
Algorithm Hash digest
SHA256 f64e43b54d462b7a325bbda7df94be3ac62a5a10d1853d72e0bca281cbcc3ba0
MD5 ec8acaed873a727b77f72dc8ae8eb607
BLAKE2b-256 80d819b4ed1323404e006fe11785f2abdca7ce2bcd8bff56134ea1b9a4708fbd

See more details on using hashes here.

File details

Details for the file gradco-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gradco-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a5a006ac1d6dbbf6ea15ae25f7aeb3d21dc0e710c1e177faf5963d4d9f590d03
MD5 bef6ae8dac84076326da5108be18548c
BLAKE2b-256 4d9894525f2eafb7cf251661a22fffaa31ed070de4aa5ebb0f63b6f45c29bbaa

See more details on using hashes here.

File details

Details for the file gradco-0.1.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for gradco-0.1.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 868409f36b888c165172d09925a2292e51e7b4f95dcb0dce278b3345a46cbe73
MD5 bc17e502349e8eb87e710a8cb8075973
BLAKE2b-256 7732689ec744db94ab221ec91752f644dbb86bcbf1764f074481533e173f11ea

See more details on using hashes here.

File details

Details for the file gradco-0.1.7-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gradco-0.1.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9b46ba71e51c6305dcb78620ff43be412f5eb65d8924b33d17ed8e5244302739
MD5 d689a660118e33dcf873fd1de01a3622
BLAKE2b-256 bd89e56a9510ba2b1a36e4a64b8683f016e96fb0e3f6b5cda0f343be6fae885f

See more details on using hashes here.

File details

Details for the file gradco-0.1.7-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gradco-0.1.7-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 18143418e48666a2d2b59b38404e366c6c84f5b236e68effbb7efaa35ee67d45
MD5 39acc36a0e08e737970cc81c4e6052a5
BLAKE2b-256 fd3ca28dee1429e11726d787542c7ee8005d0922ecc4b8d705f41c93ae4cab65

See more details on using hashes here.

File details

Details for the file gradco-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gradco-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 effd9cd8f8b7e708fe0fd2b7367612fae6cf1dd318a9c1e0229928697b3c67b2
MD5 2868527007d2d139e8413224cf6c4115
BLAKE2b-256 3c934f1b234e522f7fbe8b45dd694f7a8f1af4775215ee2e4694de0f9bba5ed8

See more details on using hashes here.

File details

Details for the file gradco-0.1.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for gradco-0.1.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d51d8cc738fc6bf49355959957eaf720d00d139c0e6f7bcba3d4009e02f9408c
MD5 9b7d8524ee99199557ed9cbd495b9b21
BLAKE2b-256 b7463f767cc4a55d12ca736e6e80445e735739364a17cff3bc3df1a0a0607732

See more details on using hashes here.

File details

Details for the file gradco-0.1.7-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gradco-0.1.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b4d40f6c7401ce049915139f2d855d023bbbedc391d9432cd38b63ea636f0ced
MD5 2b771474203b7d453a5c591d88240c77
BLAKE2b-256 fa4c67a52f22aec4eedbd26369a75937db8c53123d8d22739660b37d674ab6d0

See more details on using hashes here.

File details

Details for the file gradco-0.1.7-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gradco-0.1.7-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f0f5cd3b08f15ff73c5bc8e5835beb8fd8886d16dbbda0744902428b2728b1fa
MD5 a503b6acf11b2f486b7020c09b001a00
BLAKE2b-256 2150500bca7e3d8a615352d1ee34af23c875812dab47d45c656a508fdb8041bb

See more details on using hashes here.

File details

Details for the file gradco-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gradco-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f482391b41459566b42d1e8d3f8d0b50ded8090af385482d1bb462c085885026
MD5 593965cff3ac9dcc904ae82a4259316d
BLAKE2b-256 0573ce669f16dfefc10975f954dba42845d339c991730f42cd8ec1caed2d51b6

See more details on using hashes here.

File details

Details for the file gradco-0.1.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for gradco-0.1.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ced980b18299bc159946184ee75b06d70e3537b95922748cd2ec6f6d5a215aa4
MD5 0c273791561a796d88745cb4440ec44d
BLAKE2b-256 bd495b3e897ff0e85452bcce004a3f51e17e53e0868fc39ccf120cd5019c23b0

See more details on using hashes here.

File details

Details for the file gradco-0.1.7-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gradco-0.1.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8dc572d223d7c15343ad3347a624792cad5d6298a5939cbe6afa39adb09728f7
MD5 538bf404377db9a49b4d1072a99276a8
BLAKE2b-256 a71ffeb17255ea2bed026c8f172208418ba6ba82a0daa1317ee4b97dfc305ed9

See more details on using hashes here.

File details

Details for the file gradco-0.1.7-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gradco-0.1.7-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f9388b709b4743adaae11fb90310cf60c70881df7c4785799b3c2e92140f46fe
MD5 bce600ded29fde2068e63bb7c937d9c9
BLAKE2b-256 48812c72eada41cd5fb6ea283100de4b34016213e9ae89342b6760610838e7b9

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