Functions§
- determine_
node_ assignments - Decides which node each data vector belongs to. Finds the nearest row of
node_embeddingsfor each row ofdata_embeddings, then groups the rows by node into(offsets, data). Noden’s rows aredata[offsets[n]..offsets[n+1]]. - group_
by_ assignments - Groups data point indices by the representative they were assigned to,
stored as two flat arrays instead of a list of lists. Example:
best_ids = [1, 0, 1, 2],num_reps = 3.