pyclugen
pyclugen is a Python implementation of the clugen algorithm for generating multidimensional clusters with arbitrary distributions. Each cluster is supported by a line segment, the position, orientation and length of which guide where the respective points are placed.
See the documentation and examples for more details.
Installation
Install from PyPI:
pip install --upgrade pip
pip install pyclugen
Or directly from GitHub:
pip install --upgrade pip
pip install git+https://github.com/clugen/pyclugen.git#egg=pyclugen
Quick start
from pyclugen import clugen
import matplotlib.pyplot as plt
out2 = clugen(2, 4, 400, [1, 0], 0.4, [50, 10], 20, 1, 2)
plt.scatter(out2.points[:, 0], out2.points[:, 1], c=out2.clusters)
plt.show()
out3 = clugen(3, 5, 10000, [0.5, 0.5, 0.5], 0.2, [10, 10, 10], 10, 1, 2)
fig = plt.figure()
ax = fig.add_subplot(projection="3d")
ax.scatter(out3.points[:, 0], out3.points[:, 1], out3.points[:, 2], c=out3.clusters)
plt.show()
See also
- CluGen.jl, a Julia implementation of the clugen algorithm.
- clugenr, an R implementation of the clugen algorithm.
- MOCluGen, a MATLAB/Octave implementation of the clugen algorithm.
Reference
If you use this software, please cite the following reference:
- Fachada, N. & de Andrade, D. (2023). Generating multidimensional clusters with support lines. Knowledge-Based Systems, 277, 110836. https://doi.org/10.1016/j.knosys.2023.110836 (arXiv preprint)
License
Metadata
Release files for pyclugen 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyclugen-1.1.4.tar.gz | 27.3 kB | Without provenance | Details for pyclugen-1.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyclugen-1.1.4-py3-none-any.whl | Python 3 | none | any | Details for pyclugen-1.1.4-py3-none-any.whl |
Total release size: 48.7 kB
Release files / pyclugen-1.1.4.tar.gz
| Download URL | pyclugen-1.1.4.tar.gz |
|---|---|
| Size | 27.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3185aac637dff64307d6f73fa3bd70b16a571522493df1d355f25af95bd47994
|
|
BLAKE2b-256 checksum How to use checksums |
e80c16cf413a133dd9b7ff11d4c34b3894c7032a81776effae119a32c8e21ba0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / pyclugen-1.1.4-py3-none-any.whl
| Download URL | pyclugen-1.1.4-py3-none-any.whl |
|---|---|
| Size | 21.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd2f3531cd74ab49e42b07a275d980a90f22a4a7a7d96c0a3799df0dd4ed0e9f
|
|
BLAKE2b-256 checksum How to use checksums |
2feef6fc82e1df31ccb30701564fe0b17f4fc2f27372ba20ba215df584888c8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for pyclugen 1.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.