feat(api): person embedding cluster map endpoint (PCA diagnostic view, spec 042) #816
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/embedding-map-api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
GET /api/discovery/domains/{domainKey}/class-instances/{instanceId}/embedding-mapreturning a deterministic 2D PCA projection of a person's face-embedding cluster: confirmed faces, tentative candidate faces (with suggesting candidateId), and the 5 nearest neighbor persons ranked by min pairwise cosine distance.EmbeddingMapService(ClassInstanceDiscoveryService untouched) +Pca2D(commons-math3 EigenDecomposition; lexicographically sorted accumulation, deterministic sign convention, per-axis [-1,1] scaling; permutation-invariance covered by test).truncatedflag.Tests
Pca2DTest(3): two-cluster separation on PC1, exact determinism under permuted input order, range/edge cases.EmbeddingMapServiceTest(5): tentative points carry candidateId, neighbor ranking + 5-limit, cross-model-space skip, cap+truncated, access rejection.EmbeddingMapEndpointTest(3): controller delegation, JSON contract field names, no-raw-vector scan.Spec: specs/042-person-embedding-cluster-map-(pca-diagnostic-view)/