Skip to main content

Module cluster_manager

Module cluster_manager 

Source
Expand description

Semantic Cluster Manager — online k-means-style document clustering over embeddings.

Manages semantic embedding clusters, assigns documents to clusters, updates centroids incrementally via exponential moving average, and detects cluster drift over time.

Structs§

BatchCluster
A cluster produced by batch k-means.
BatchClusterConfig
Configuration for batch k-means clustering.
BatchClusterManagerStats
Aggregate statistics for BatchSemanticClusterManager.
BatchSemanticClusterManager
Batch k-means semantic cluster manager.
ClusterAssignment
Assignment of a document to a cluster.
ClusterManagerConfig
Configuration for SemanticClusterManager.
ClusterManagerStats
Aggregate statistics over all clusters managed by SemanticClusterManager.
SemanticCluster
A single semantic cluster with a centroid maintained via incremental updates.
SemanticClusterManager
Online k-means-style semantic cluster manager.

Functions§

euclidean_distance
Compute Euclidean distance between two vectors of equal length.
vec_mean
Compute element-wise mean of a set of vectors.