Skip to main content

NclustGen

Nclustgen is a python tool to generate biclustering and triclustering datasets programmatically.

It wraps two java packages G-Bic, and G-Tric, that serve as backend generators. If you are interested on a GUI version of this generator or on using this generator in a java environment check out those packages.

This tool adds some functionalities to the original packages, for a more fluid interaction with python libraries, like:

  • Conversion to numpy arrays
  • Conversion to sparse tensors
  • Conversion to networkX or dgl n-partite graphs

Installation

This tool can be installed from PyPI:

pip install nclustgen

NOTICE: Nclustgen installs by default the dgl build with no cuda support, in case you want to use gpu you can override this by installing the correct dgl build, more information at: https://www.dgl.ai/pages/start.html.

Getting started

Here are the basics, the full documentation is available at: http://nclustgen.readthedocs.org.

## Generate biclustering dataset

from nclustgen import BiclusterGenerator

# Initialize generator
generator = BiclusterGenerator(
    dstype='NUMERIC',
    patterns=[['CONSTANT', 'CONSTANT'], ['CONSTANT', 'NONE']],
    bktype='UNIFORM',
    in_memory=True,
    silence=True
)

# Get parameters
generator.get_params()

# Generate dataset
x, y = generator.generate(nrows=50, ncols=100, nclusters=3)

# Build graph
graph = generator.to_graph(x, framework='dgl', device='cpu')

# Save data files
generator.save(file_name='example', single_file=True)

## Generate triclustering dataset

from nclustgen import TriclusterGenerator

# Initialize generator
generator = TriclusterGenerator(
    dstype='NUMERIC',
    patterns=[['CONSTANT', 'CONSTANT', 'CONSTANT'], ['CONSTANT', 'NONE', 'NONE']],
    bktype='UNIFORM',
    in_memory=True,
    silence=True
)

# Get parameters
generator.get_params()

# Generate dataset
x, y = generator.generate(nrows=50, ncols=100, ncontexts=10, nclusters=25)

# Build graph
graph = generator.to_graph(x, framework='dgl', device='cpu')

# Save data files
generator.save(file_name='example', single_file=True)

License

GPLv3

Documentation

The documentation is available at: https://nclustgen.readthedocs.org.

Metadata

Release files for nclustgen 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nclustgen 1.0.4
File Size Uploaded
nclustgen-1.0.4.tar.gz 25.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for nclustgen 1.0.4
File Interpreter ABI Platform
nclustgen-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 50.7 MB

Release files / nclustgen-1.0.4.tar.gz

Download URL nclustgen-1.0.4.tar.gz
Size 25.3 MB
Tags Source
SHA-256 checksum
How to use checksums
8a9ebefc6bf3c85690ddef64327b8d45e0d21bd18d16a988a5cd90593880bd25
BLAKE2b-256 checksum
How to use checksums
ec511e69f184cdf21ebc340060b29b66eaab047c6c747d0b7cdd4ee0debaced4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

Release files / nclustgen-1.0.4-py3-none-any.whl

Download URL nclustgen-1.0.4-py3-none-any.whl
Size 25.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e6865edcf879ed97ed009bcc47bb2063cde51ff3d14ebc7be3ac84da0a505163
BLAKE2b-256 checksum
How to use checksums
c7f75d06e51df10313c5bc64fe68b436c176a5e44a0219234eacb56b97abd5e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page