Skip to main content

CDbw

Compute the S_Dbw validity index
S_Dbw validity index is defined by equation:

CDbw = compactness*cohesion*separation

Highest value -> better clustering.


Installation:

pip install --upgrade cdbw

Usage:

from cdbw import CDbw
score = CDbw(X, labels, metric="euclidean", alg_noise='comb', 
     intra_dens_inf=False, s=3, multipliers=False)

Parameters:

X : array-like, shape (n_samples, n_features)
    List of n_features-dimensional data points. Each row corresponds
    to a single data point.
labels : array-like, shape (n_samples,)
    Predicted labels for each sample.  (-1 - for noise)
metric : str,
    The distance metric, can be ‘braycurtis’, ‘canberra’, ‘chebyshev’, ‘cityblock’, ‘correlation’,
    ‘cosine’, ‘dice’, ‘euclidean’, ‘hamming’, ‘jaccard’, ‘kulsinski’, ‘mahalanobis’, ‘matching’, ‘minkowski’,
    ‘rogerstanimoto’, ‘russellrao’, ‘seuclidean’, ‘sokalmichener’, ‘sokalsneath’, ‘sqeuclidean’, ‘wminkowski’,
    ‘yule’.
alg_noise : str,
    Algorithm for recording noise points.
    'comb' - combining all noise points into one cluster (default)
    'sep' - definition of each noise point as a separate cluster
    'bind' -  binding of each noise point to the cluster nearest from it
    'filter' - filtering noise points
intra_dens_inf : bool,
    If False (default) CDbw index = 0 for cohesion or compactness - inf or nan.
s : int,
    Number of art representative points. (>2)
multipliers : bool,
    Format of output. False (default) - only CDbw index, True - tuple (compactness, cohesion, separation, CDbw)

Returns:

cdbw : float,
    The resulting CDbw validity index.

References:

  1. M. Halkidi and M. Vazirgiannis, “A density-based cluster validity approach using multi-representatives” Pattern Recognition Letters 29 (2008) 773–786.

Metadata

Release files for cdbw 0.2

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

Source distribution (sdist)

Source distribution for cdbw 0.2
File Size Uploaded Provenance
cdbw-0.2.tar.gz 8.6 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 16.6 kB

Release files / cdbw-0.2.tar.gz

Download URL cdbw-0.2.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
616c6d29bbff01e5695588229527ce271c9fe1fef671515bc823b8244d50f161
BLAKE2b-256 checksum
How to use checksums
15495e1751cd8eeeba37f306ec1c4b4b0f6f1be8c4021e8c3b58c0559b5d2232
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.7

Release files / cdbw-0.2-py3-none-any.whl

Download URL cdbw-0.2-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b4be00dfae7911bebfd72416584dfbc9d21674ee2447898a71bbd2330db4089
BLAKE2b-256 checksum
How to use checksums
18b7690e4758d06446b235fee7e7f6b1ef1cded365e78eb09925bda0906c41d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.7

Security for cdbw 0.2

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.

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files No provenance

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