podqast
Machine Learning GuideOCDevelAll episodes

MLA 011 Practical Clustering Tools

35 min
Next episodeMLG 032 Cartesian Similarity Metrics42 min
Get its new episodes on Latest. No account

Primary clustering tools for practical applications include K-means using scikit-learn or Faiss, agglomerative clustering leveraging cosine similarity with scikit-learn, and density-based methods like DBSCAN or HDBSCAN. For determining the optimal number of clusters, silhouette score is generally preferred over inertia-based visual heuristics, and it natively supports pre-computed distance matrices.
Links • Notes and resources at ocdevel.com/mlg/mla-11

K-means Clustering • K-means is the most widely used clustering algorithm and is typically the first method to try for general clustering tasks.

Alternatives to K-means for High Dimensions • For text embeddings with high dimensionality, agglomerative (hierarchical) clustering methods are preferable, particularly because they allow the use of different similarity metrics.

Semantic Search and Vector Indexing • Libraries such as Faiss, Annoy, and HNSWlib provide approximate nearest neighbor search for efficient semantic search on large-scale vector data.

Determining the Optimal Number of Clusters • Both K-means and agglomerative clustering require a predefined number of clusters, but this is often unknown beforehand.

More from Machine Learning Guide