Docs Navigation (Stage 02)›

Jaccard Annealing Clustering

Regularized Jaccard tag partitioning with QAP Simulated Annealing and planar hitting-set edges.

Key Takeaways

  • Built-in default clustering strategy when items carry discrete tags.
  • Best when you want crisp structural separation between 1-cluster halos, 2-cluster edge bridges, and 3-cluster centroids.

Visual Mechanism

1. QAP Simulated Annealinghigh Jaccard → 1-hop edgeanchor2. Crisp Vertex / Edge / Centroid Snappingw = (⅓, ⅓, ⅓)
Partitions tags via regularized Jaccard similarity, embeds related clusters on adjacent mesh vertices via QAP Simulated Annealing, and snaps shared items onto planar edges and centroids.

Factory Signature

Re-exported from @simplex-viz/core, @simplex-viz/svg, and @simplex-viz/reactStage 02 Overview →
createJaccardAnnealingClusteringStrategy<TItem, TTagMeta>(options?: JaccardClusteringOptions<TItem>): SimplexClusteringStrategy<TItem, TTagMeta>

Options & Defaults

getTagsDefault: item.tags

(item: TItem) => readonly string[]

Extracts discrete topic tags per item.

sharedTagRuleDefault: 'planar-hitting-set'

'planar-hitting-set' | 'strict-core' | SharedTagExpansionFn

Governs how bridge tags shared across non-adjacent clusters are routed onto mesh edges.

anchorRuleDefault: 'explaining-away'

'explaining-away' | 'all-matching' | SimplexItemAnchorFn

Determines simplex unit weights for items matching multiple vertex clusters.

annealingStepsDefault: 1800

number

Deterministic Simulated Annealing iterations for QAP mesh vertex placement.

Jaccard Tag Partitioning & QAP Simulated Annealing

Jaccard Annealing Clustering builds a regularized tag co-occurrence graph, partitions tags into K balanced clusters, and solves a Quadratic Assignment Problem (QAP) via deterministic Simulated Annealing so strongly co-occurring clusters sit on 1-hop adjacent mesh vertices. Across updates, the Hungarian algorithm matches new clusters to prior vertices to preserve cluster UIDs and OKLab colors.

Usage Example

import {
  SimplexTopicGraph,
  createJaccardAnnealingClusteringStrategy,
} from '@simplex-viz/react';

const jaccard = createJaccardAnnealingClusteringStrategy({
  sharedTagRule: 'planar-hitting-set',
  anchorRule: 'explaining-away',
});

<SimplexTopicGraph items={items} clusteringStrategy={jaccard} />;