An array of Uint8Arrays representing vectors.
The similarity threshold for clustering (0-1). (optional, defaults to 0.75).
A function to compute similarity (default: Hamming similarity).
An array of clusters, where each cluster is an array of similar vector indices. The array is sorted by cluster size.
Simple API to compute clusters for a set of vectors. If repeated calls are to be made with the same vectors, but different threshold settings, consider calling buildSimilarityGraph first then repeated clusterByThreshold instead which will avoid recomputing all the scores between vector pairs.