a python library for graph flow
Project description
XFlow Homepage | Documentation | Paper Collection
XFlow is a library built upon Python to easily write and train method for a wide range of applications related to graph flow problems. XFlow is organized task-wise, which provide datasets benchmarks, baselines and auxiliary implementation.
Installation
pip install xflow-net
Example
import sys
import os
current_script_directory = os.path.dirname(os.path.abspath(__file__))
xflow_path = os.path.join(current_script_directory, '..', '..', 'xflow')
sys.path.insert(1, xflow_path)
from xflow.dataset.nx import BA, connSW
from xflow.dataset.pyg import Cora
from xflow.diffusion.SI import SI
from xflow.diffusion.IC import IC
from xflow.diffusion.LT import LT
from xflow.seed import random as seed_random, degree as seed_degree, eigen as seed_eigen
from xflow.util import run
# graphs to test
fn = lambda: connSW(n=1000, beta=0.1)
fn.__name__ = 'connSW'
gs = [Cora, fn, BA]
# diffusion models to test
df = [SI, IC, LT]
# seed configurations to test
se = [seed_random, seed_degree, seed_eigen]
# run
# configurations of IM experiments
from xflow.method.im import pi as im_pi, degree as im_degree, sigma as im_sigma, celfpp as im_celfpp, greedy as im_greedy
me = [im_pi]
rt = run (
graph = gs, diffusion = df, seeds = se,
method = me, eval = 'im', epoch = 10,
budget = 10,
output = [ 'animation', 'csv', 'fig'])
[Result]
Create your own models
Benchmark Task
Influence Maximization
Blocking Maximization
- greedy
- pi
- sigma
- eigen-centrality
- degree
Source Localization
- NETSLEUTH (Legacy and Fast versions)
- Jordan Centrality
- LISN.
Experimental Configurations
- Graphs: Compatiable with graph objects/class by Networkx and Pytorch Geometric
- Diffusion Models: Support NDLib
Contact
Feel free to email us if you wish your work to be listed in this repo. If you notice anything unexpected, please open an issue and let us know. If you have any questions or are missing a specific feature, feel free to discuss them with us. We are motivated to constantly make XFlow even better.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for xflow_net-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a5399dab149e4e7e4b1b33d3f6a591180b8b549bad152da83cf0517946ffc27 |
|
MD5 | 366ea6da618393db9c13febdf68ac08a |
|
BLAKE2b-256 | 4762eb832811adc1697de1c1d0a1d53ba9c03f47291b56265db0e8a6590f4034 |