Skip to content

Decouple projection and KMeans in embed_explore app #25

@NetZissou

Description

@NetZissou

The precalculated app was refactored in #24 to separate dim reduction from KMeans so users can project once and run multiple k values without re-projecting. The embed_explore app still couples them in a single "Run Clustering" action.

We'd like to mirror the precalculated app's split:

  • Replace render_clustering_section() in apps/embed_explore/components/sidebar.py with separate render_projection_section() and render_kmeans_section()
  • Use existing helpers from Separate dim reduction and KMeans into independent operations #24: ClusteringService.run_dim_reduction_safe() and run_kmeans_only_safe()
  • Replace hardcoded color_col = 'cluster' in shared/components/visualization.py:127 with the "Color by" dropdown pattern. Color by different KMeans cluster result
  • Preserve KMeans columns on re-projection with PCA, TSNE, UMAP

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions