Skip to main content

Python implementation of minimax-linkage hierarchical clustering

Project description

PyMinimax

Gitpod Ready-to-Code Documentation Status build codecov image Downloads Downloads License

PyMinimax is a Python implementation of minimax-linkage hierarchical clustering.

Installation

pip install pyminimax

Usage

from pyminimax import minimax
from scipy.spatial.distance import pdist
from scipy.cluster.hierarchy import complete

data = [[0, 0], [0, 1], [1, 0], [0, 4], [0, 3], [1, 4], [4, 0], [3, 0], [4, 1], [4, 4], [3, 4], [4, 3]]

dist = pdist(data)              # flattened distance matrix computed by scipy

Z_complete = complete(dist)     # complete linkage result
Z_minimax = minimax(dist)       #  minimax linkage result

The most important function in PyMinimax is pyminimax.minimax. Its usage is very much similar to the hierarchical clustering methods in SciPy, say scipy.cluster.hierarchy.complete. See the documentation for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyminimax, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size pyminimax-0.1.2.tar.gz (7.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page