Python SHiP-framework
Welcome to the official Python bindings for the SHiP (Similarity-Hierarchical-Partitioning) clustering framework.
The SHiP framework offers a modular and extensible approach to hierarchical clustering based on similarity trees, ultrametric hierarchies, and flexible partitioning strategies.
This Python package exposes several submodules:
Modules Overview
Getting Started
Import the main SHiP class to construct a similarity tree and cluster the tree by using one of the available partitioning methods:
from SHiP import SHiP
# Initialize with your data and preferred tree type
ship = SHiP(data=my_data, treeType="DCTree")
# Perform clustering with chosen parameters
labels = ship.fit_predict(hierarchy=2, partitioningMethod="Elbow")
For more detailed usage and examples, please refer to the module-specific documentation pages.
The SHiP framework is implemented in C++ for performance (for C++ documentation, see C++ API) and exposes a Python interface via pybind11 for easy integration in Python workflows.
Feel free to explore the submodules to see all the options applicable to SHiP.