ssarfraz/FINCH-Clustering

Source Code for FINCH Clustering Algorithm

What it solves

Traditional clustering methods often require the user to set parameters like the number of clusters or distance thresholds, and they can be slow on large datasets. FINCH removes this burden by automatically discovering a hierarchical clustering structure directly from the data, without any parameter tuning, and it does so very quickly.

How it works

FINCH works by looking at each data point's first neighbor — the closest other point according to a chosen distance measure (for example, cosine distance). It then links points that are mutual first neighbors into clusters, and repeatedly applies this idea at a coarser level to build a hierarchy of clusters. The algorithm is described as parameter-free because it does not require the user to specify the number of clusters, though you can optionally ask for a desired number. For very large datasets, you can install an optional package (PyNNDescent) that speeds up the neighbor search.

Who it’s for

FINCH is for anyone who needs to cluster datasets without spending time on parameter tuning or waiting for slow algorithms. It is particularly useful in research and applied machine learning, with example notebooks showing usage on toy 2D data and on the STL-10 image dataset. A minimal MATLAB version is also provided, and variants exist for video segmentation and fast dimensionality reduction.

Highlights

  • Completely parameter-free by default — no need to specify the number of clusters.
  • Fast and scalable, with optional approximate nearest neighbor support for large data.
  • Provides a natural hierarchical clustering as well as a flat partition.
  • Published in CVPR 2019 and includes demo notebooks and a PyPI package.

Related

  • Project
  • Project
  • Project
  • Project