Skip to content

feat(clustering): improve auto-K selection algorithm and simplify settings - #38

Open
Harsh16gupta wants to merge 1 commit into
joplin:feat/ui-text-size-scalingfrom
Harsh16gupta:feat/auto-k-selection
Open

feat(clustering): improve auto-K selection algorithm and simplify settings#38
Harsh16gupta wants to merge 1 commit into
joplin:feat/ui-text-size-scalingfrom
Harsh16gupta:feat/auto-k-selection

Conversation

@Harsh16gupta

Copy link
Copy Markdown
Collaborator

This PR improves the Auto-K clustering selection logic and enables Auto-K when Joplin Native AI embeddings are active. It also cleans up unused setting options from Joplin preferences.

What changed:

  • Enabled Auto-K (kmeans-auto, kmedoids-auto) for Native AI embeddings instead of forcing fixed K=6.
  • Updated Auto-K search range for N >= 20 from sqrt(N) to floor(N / 3) (capped at 15) to prevent under-clustering on medium/large note collections.
  • Added a 0.025 silhouette tolerance margin during K selection to prefer finer, more useful note categories over coarse clusters.
  • Added seed decorrelation (seed + k) across K sweeps and a single-cluster fallback (K=1) for degenerate inputs.
  • Removed distance metric and random seed settings from Joplin Options UI to simplify preferences (text embeddings default to Cosine similarity; low-D UMAP coordinates automatically use Euclidean distance).

Testing:
I have manually tested the whole pipeline, and the results are great!

@Harsh16gupta Harsh16gupta self-assigned this Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant