Skip to content

GraphPrepKit πŸ•ΈπŸ›Ÿ is a powerful and versatile graph preprocessing library designed to simplify and streamline the data preparation phase for graph-based applications.

p4zaa/GraphPrepKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

58 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GraphPrepKit πŸ•ΈπŸ›Ÿ

GraphPrepKit πŸ•ΈπŸ›Ÿ is a powerful and versatile graph preprocessing library designed to simplify and streamline the data preparation phase for graph-based applications. It provides a comprehensive set of tools and utilities to efficiently preprocess graphs, allowing users to transform, clean, and manipulate graph data with ease.

Wiki πŸ“š

πŸ‘‰ Documentation Here πŸ“‘

Installation βš™οΈ

pip install -q git+'https://github.com/p4zaa/GraphPrepKit.git'
from GraphPrepKit import construct, homo, hetero

Graph Dataset Construction πŸ› οΈ

Construct connection dataframe

Note target column must contain list of connected elements. Example

source target
't0001' ['u0001', 'u0005', 'u0010']
't0002' ['u0001', 'u0008', 'u0012']
>>> dfConn = construct.get_connection_table(df, target='target')
>>> dfConn
source target
't0001' 'u0001'
't0001' 'u0005'
't0001' 'u0010'
't0002' 'u0001'
't0002' 'u0008'
't0002' 'u0012'

Map unique ID to its associated index

>>> map_to_idx(dfConn, source='source', target='target', type='hetero', inplace=True)
>>> dfConn
source target
0 0
0 1
0 3
1 0
1 2
1 4

About

GraphPrepKit πŸ•ΈπŸ›Ÿ is a powerful and versatile graph preprocessing library designed to simplify and streamline the data preparation phase for graph-based applications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages