Documentation
¶
Overview ¶
Package gmmclusterer is an optional, host-wired vector clusterer for fabriq context distillation. It implements agent.Clusterer over embedding vectors (NeedsVectors()=true) as a deterministic k-means — a pragmatic alternative to the in-core multi-probe SimHash default. True GMM+UMAP is a documented extension; this keeps core import-clean (lives in forgeext, stdlib-only).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clusterer ¶
type Clusterer struct {
// contains filtered or unexported fields
}
Clusterer is a deterministic k-means vector clusterer.
Recall cluster-coverage note: recall's digestCovers pruning uses ParseClusterID to test whether a cluster digest's prefix covers an entity's SimHash Bucket. This Clusterer derives cluster ids from centroid hashes (see clusterID), which share the ClusterID wire format but occupy a different keyspace than the SimHash buckets used by the in-core SimHashClusterer. As a result, cluster digests produced by this Clusterer will under-prune in recall (a few extra entity rows may survive the dedup pass) but will NEVER false-prune — no relevant entity is dropped. This is a safe no-op; it does not affect correctness, only recall window compactness.
func New ¶
New builds a k-means clusterer producing up to k clusters; idBits sizes the cluster-id prefix (mirrors the SimHash cluster id shape).