/ShiftClustering

A Python package for MeanShift clustering and its variants MeanShift++, GridShift

Primary LanguageJupyter NotebookGNU General Public License v3.0GPL-3.0

ShiftClustering

A Python package for MeanShift clustering and its variants MeanShift++, GridShift. This package is for learning and it not under development.

Installation

pip install -e .

Usage

from sklearn.datasets import make_blobs
from shiftclustering import MeanShiftPP, GridShift

X, labels_true = make_blobs(n_samples=50000, n_features=4, centers=1000, random_state=42)

meanshiftpp = MeanShiftPP(bandwidth=1.0)
gridshift = GridShift(bandwidth=1.0)

labels_meanshiftpp = meanshiftpp.fit_predict(X)
labels_gridshift = gridshift.fit_predict(X)

Acknowledgements

This repo is based on the following repository

Please cite their papers if you use this package.