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.

Source Distribution

pyminimax-0.1.2.tar.gz (7.3 kB view details)

Uploaded Source

File details

Details for the file pyminimax-0.1.2.tar.gz.

File metadata

  • Download URL: pyminimax-0.1.2.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.7.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.7.10

File hashes

Hashes for pyminimax-0.1.2.tar.gz
Algorithm Hash digest
SHA256 90f632c513d6f53d9e3bce9c5ae1a7bda7fa9e77d4c5ebec2b9e157921f27d6b
MD5 2bc98e128be3a01da40d20f6f92a932e
BLAKE2b-256 33c2285233d7dcf9012901a5403500396c7aa7ffacca2b72142e2fdae24ff69b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page