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.8.tar.gz (304.2 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.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (358.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

gradco-0.1.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (354.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

gradco-0.1.8-cp312-cp312-macosx_10_13_x86_64.whl (44.3 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

gradco-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (357.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

gradco-0.1.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (354.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

gradco-0.1.8-cp311-cp311-macosx_11_0_arm64.whl (43.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.9+ x86-64

gradco-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (357.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

gradco-0.1.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (354.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

gradco-0.1.8-cp310-cp310-macosx_11_0_arm64.whl (43.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

gradco-0.1.8-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.8.tar.gz.

File metadata

  • Download URL: gradco-0.1.8.tar.gz
  • Upload date:
  • Size: 304.2 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.8.tar.gz
Algorithm Hash digest
SHA256 84c905eeb5a2c427423c6eb6c27326c2c12455fda6f89c0023f4886f0958593c
MD5 285e578ef89b65f19176a054811034a9
BLAKE2b-256 a774f489adce2a9200f003017763cd9a0f9f2d9c4b3537d5efd7d6a8517c6ff4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gradco-0.1.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d9e12b776c9cf2368dc9046c358f8acd8ac9af67c11ed634f2aff4a45505dcab
MD5 dff6560be410f5ca8fb5dea2ad60db5a
BLAKE2b-256 9fa47159f2acc52423168a44118159712e4c401cab2b8f22834c7f287175463d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gradco-0.1.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8cc31ac243cb0487c5c0cbc81ca35acbf5e03ee8b6b4a2cde044397f847634bd
MD5 9c28f823c7ca86d87cce73efe26fb064
BLAKE2b-256 bee4a45c055ab3ff9de010cc909c09fdb7a792b298119097ce9de19861b2a548

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gradco-0.1.8-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3a747cb5bc966ea0ca0540114a3fd87842ec75bd2fb371cf24f9c1aecd633b6f
MD5 55dda3cae1362c8c9e564d55412330f1
BLAKE2b-256 a2037686ee02d6ae5ece53e2de0d2265cb8b7ef75e5bb86ca2079c0d01a742cb

See more details on using hashes here.

File details

Details for the file gradco-0.1.8-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for gradco-0.1.8-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 0622b5b36c07b3be619b53523e22f2e5c6910679d2a27709ba85913b17b2cd7b
MD5 649a9938c257de11bc44aefefce28f06
BLAKE2b-256 7d72fb96781889e4a2d9e41ba0714e30818539d82d1c257964d05737d3b5615d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gradco-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 09f48873f686c913789d09bea6708926a5ffe83632cb481f165b7759ecf16c0d
MD5 f6d8f9d062a0a1200046595c101f8cb1
BLAKE2b-256 fb35ab53554ff7f4e2354cfa4f0c16140861a22c147f49a8ce3da0e922e6cff0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gradco-0.1.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 590b0ad53545110203527d1c960fc769f9ba63b8c68ef6a2e45791f7e221a511
MD5 72a6f55d32c70d4e11db9635b6eb11a1
BLAKE2b-256 c174a4dd5ba9e76957f1c2abe3253771876a9fe6ed35047bfe947a928fd74952

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gradco-0.1.8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7dc50ed0d5ebd843bdbcf702687d080d509be3f480b289757a1f9c95516f944c
MD5 d38bfce353ed728a5571864eeb3a22e7
BLAKE2b-256 019f7f628c064a75ae99db5dfbc020698a0285296d35197c7e0fa6ed59b727b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gradco-0.1.8-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c5517b5c389b3a6859e769450bc8cc1d94aa712cb7cf6543054aa791691000f0
MD5 f03f3d3462ac6bf1f53a9af8c0065d02
BLAKE2b-256 4183135db224fb0982841819e7e470cf5aa56e20dc245162b8c5466aed60743a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gradco-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0b160ae2e30bd25f788e78132349776950002164268b492a35f8a2a683f75dfc
MD5 22b49ab2476f5e218c119ed2455600c5
BLAKE2b-256 bcda80d849aa504b51d55c57da88ba43604e1dc6f8fe5002320bdf297341f4c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gradco-0.1.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1f9f7bd35038ee798fe4835e3ed1710bc48c6f802d30d5f0b2c13aea6398130c
MD5 c4840dadd1cfd4223120c33c86a5ee73
BLAKE2b-256 00304642225c658ff7057540f892b1bbc1f25222047248be51edcf9893565d96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gradco-0.1.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7032d5bf58995098f5b8cba1ba086af8c689d8bfa20ab64dfe8f8d41cbf85a05
MD5 eefca0e984f7ef950b46db5f83f679b7
BLAKE2b-256 776ae1c0de63cfb596e2e9ec27432c2896c08e985df32d8dc12f7597277c06e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gradco-0.1.8-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b8a2e467aeda31d5f7cb4492000208cd55d229626db5932f489fc02bd5b17840
MD5 a9d1fce12530a7217c794f3857aa15d5
BLAKE2b-256 63f6b3126b3a260f9fbd8a84385e72bc03ab6e55c5fe6ad2917a9406b5163a6e

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