Sovereign 8s.is mirror of standardgalactic/gradco
  • Python 97.1%
  • C++ 2.7%
  • Shell 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2024-11-15 09:52:21 +01:00
c_module using dense matrices instead of sparse in the redundancy matrices 2024-01-26 18:03:28 +01:00
generate_tests added A8_8 2023-07-23 15:43:52 +02:00
integration_tests orca integration test moved 2024-05-22 17:02:28 +02:00
tests tests working 2024-07-16 12:29:27 +02:00
wheelhouse added wheelhouse dir 2024-11-15 09:52:21 +01:00
.gitignore added wheelhouse dir 2024-11-15 09:52:21 +01:00
build_for_linux.sh build for linux 2024-06-10 13:06:25 +02:00
CITATION citation 2024-07-18 14:18:55 +02:00
example.py pypi description 2024-06-03 12:34:00 +02:00
gradco.py gradco destructor 2024-11-15 09:50:00 +01:00
LICENSE correct version 2024-05-22 17:06:57 +02:00
make_cibuildwheel.sh cibuildwheel macos and linux 2024-07-18 15:05:14 +02:00
make_sdist.sh build scripts 2024-07-17 08:57:53 +02:00
publish_to_pypi.sh pbulish to pypi sh 2024-11-15 09:51:03 +01:00
publish_to_pytest.sh build scripts 2024-07-17 08:57:53 +02:00
pyproject.toml numpy version in pytest 2024-11-15 09:50:43 +01:00
python_count_functions.py cleaning 2023-08-21 14:36:28 +02:00
README.rst readme 2024-07-18 15:29:31 +02:00
setup.py tests working 2024-07-16 12:29:27 +02:00

=========================================
GRaphlet-orbit ADjacency COunter (GRADCO)
=========================================

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

------------
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
<https://doi.org/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.

.. code-block:: python

    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.