tno.sdg.graph.gen.graphbin
TNO PET Lab - Synthetic Data Generation (SDG) - Graph - Generation - GraphBin
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.0%) to scientific vocabulary
Keywords
Repository
TNO PET Lab - Synthetic Data Generation (SDG) - Graph - Generation - GraphBin
Basic Info
- Host: GitHub
- Owner: TNO-SDG
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://docs.pet.tno.nl/sdg/graph/gen/graphbin
- Size: 2.66 MB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
TNO PET Lab - Synthetic Data Generation (SDG) - Graph - Generation - GraphBin
The TNO PET Lab consists of generic software components, procedures, and functionalities developed and maintained on a regular basis to facilitate and aid in the development of PET solutions. The lab is a cross-project initiative allowing us to integrate and reuse previously developed PET functionalities to boost the development of new protocols and solutions.
The package tno.sdg.graph.gen.graphbin is part of the TNO Python Toolbox.
The research activities that led to this protocol and implementation were supported by TNO's Appl.AI programme.
Limitations in (end-)use: the content of this software package may solely be
used for applications that comply with international export control laws.
This implementation of software has not been audited. Use at your own risk.
Documentation
Documentation of the tno.sdg.graph.gen.graphbin package can be found
here.
Install
Easily install the tno.sdg.graph.gen.graphbin package using pip:
console
$ python -m pip install tno.sdg.graph.gen.graphbin
The package has two groups of optional dependencies:
tests: Required packages for running the tests included in this packagescripts: The packages required to run the example script
Usage
This repository implements part of the GraphBin algorithm. Currently, the edge
generation step of GraphBin is implemented, but not the node generation. It is
only supported to generate synthetic graphs "from scratch", i.e. without a
source graph from which characteristics are learned. Instead, the current
implementation provides the method GraphBin.from_scratch, which generates a
new random graph based on the provided parameters.
The parameters are as follows:
n_samples: The number of nodes to generateparam_feature: Parameter governing exponential distribution from which the value of the "feature" is sampled (i.e. transaction amount)param_degree: Parameter governing the powerlaw distribution from which the degrees of the nodes are sampledcor: Specify the correlation betweenparam_featureandparam_degreeparam_edges: Roughly related to the strength of the binning on the edge probabilities
Below, examples of feature and degree distributions are shown for different
values of param_feature and param_degree.

Example Script
Be sure to install the scripts optional dependency group (see installation
instructions).
```python import matplotlib.pyplot as plt import networkx as nx
from tno.sdg.graph.gen.graphbin import GraphBin
N = 200
graphbin = GraphBin.fromscratch( nsamples=N, paramfeature=2000, paramdegree=19, cor=0.3, paramedges=4000, randomstate=80, ) graph = graphbin.generate() ```
Plot the node degree & node feature.
python
plt.figure(figsize=(15, 10), dpi=300)
plt.scatter(graph.degree, graph.feature, s=150, alpha=0.65)
plt.xlabel("Node degree")
plt.ylabel("Node feature")
plt.title("Node degree and node feature (node-level feature), for " + str(N) + " nodes")
plt.show()

And the graph:
```python plt.figure(figsize=(15, 10), dpi=300) G = nx.Graph() G.addnodesfrom(graph.index) G.addedgesfrom(tuple(map(tuple, graph.edges)))
pos = nx.springlayout(G, k=100 / N) nx.draw(G, nodesize=350, node_color=graph.feature, pos=pos) plt.title("Synthetic graph with nodes colored by feature value") plt.show() ```

Owner
- Name: TNO - PET Lab - Synthetic Data Generation (SDG)
- Login: TNO-SDG
- Kind: organization
- Email: petlab@tno.nl
- Repositories: 1
- Profile: https://github.com/TNO-SDG
Part of TNO PET Lab
Citation (CITATION.cff)
cff-version: 1.2.0
license: Apache-2.0
message: If you use this software, please cite it using these metadata.
authors:
- name: TNO PET Lab
city: The Hague
country: NL
email: petlab@tno.nl
website: https://pet.tno.nl
type: software
url: https://pet.tno.nl
contact:
- name: TNO PET Lab
city: The Hague
country: NL
email: petlab@tno.nl
website: https://pet.tno.nl
repository-code: https://github.com/TNO-SDG/graph.gen.graphbin
repository-artifact: https://pypi.org/project/tno.sdg.gen.graph.graphbin
title: TNO PET Lab - Synthetic Data Generation (SDG) - Graph - Generation - GraphBin
version: v0.1.1
date-released: 2023-09-15
GitHub Events
Total
Last Year
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Thomas Rooijakkers | t****s@t****l | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 22 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
pypi.org: tno.sdg.graph.gen.graphbin
GraphBin: a synthetic graph generator
- Homepage: https://pet.tno.nl/
- Documentation: https://pet.tno.nl/sdg/graph/gen/graphbin/0.1.1
- License: Apache License, Version 2.0
-
Latest release: 0.1.1
published over 2 years ago