Skip to main content

A package for automatic clustering hyperparameter optmization

Project description

Hypercluster

A package for clustering optimization with sklearn.

Requirements:

pandas
numpy
scipy
matplotlib
seaborn
scikit-learn
hdbscan

Optional: snakemake

Install

pip install hypercluster

or

conda install -c bioconda hypercluster

Right now there are issue with the bioconda install on linux. Try the pip, if you are having problems.

Docs

https://hypercluster.readthedocs.io/en/latest/index.html

Examples

https://github.com/liliblu/hypercluster/tree/dev/examples

Quickstart example

import pandas as pd
from sklearn.datasets import make_blobs
import hypercluster

data, labels = make_blobs()
data = pd.DataFrame(data)
labels = pd.Series(labels, index=data.index, name='labels')

# With a single clustering algorithm
clusterer = hypercluster.utilities.AutoClusterer()
clusterer.fit(data).evaluate(
  methods = hypercluster.constants.need_ground_truth+hypercluster.constants.inherent_metrics, 
  gold_standard = labels
  )

hypercluster.visualize.visualize_evaluations(clusterer.evaluation_, multiple_clusterers=False)

# With a range of algorithms

evals, labels_df, labels_dict = optimize_clustering(data)

hypercluster.visualize.visualize_evaluations(evals)

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 hypercluster, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size hypercluster-0.1.2-py3-none-any.whl (22.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size hypercluster-0.1.2.tar.gz (13.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page