Skip to content
sungsushiPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

fvec: fast vectorisation of annotated network connectivity

Motivation:

Nodes in real networks can have assigned annotations labelling some aspect of their functional identity, which often is complementary with the network topology. Here, fvec provides a tool to calculate the annotation profile vectors of nodes by vectorising neighbour connectivity to known labels.

figure 1

For more information, see: Homologous nodes in annotated complex networks, Sung Soo Moon and Sebastian E., Ahnert, arXiv, https://arxiv.org/abs/2505.23668.

Installation:

pip3 install git+https://github.com/sungsushi/fvec.git

Usage:

Prepare a pandas dataframe edge_df with column names (e.g. source and target) specifying node ids for each edge in the edge list. If the edges are weighted, then these values should be indexed with column name weight. Edges are directed by default.

The annotation metadata should be prepared as another dataframe meta_df, with column names (e.g. node and label) specfying the annotation for each node.

from fvec import vectorisation

vectors = vectorisation(edge_df=edge_df, meta_df=meta_df, 
                        edge_row_cols=['source', 'target'], 
                        meta_row_cols=['node', 'label'], 
                        edge_weight=True)

Cite:

TODO

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages