pelinker.clustering_search_ranking¶
Shared outer ranking for clustering search (model selection / dim selection).
MCS (min_cluster_size): HDBSCAN hyperparameter on the inner grid.
Two-level criterion (same in model selection and dim selection):
- Inner (choose MCS) —
grid_objective=dbcv_ari_mean_minmaxon the MCS curve (min–max normalize mean DBCV and mean ARI, average, smooth, left plateau). - Outer (rank candidates) — at each candidate's pooled MCS, take mean DBCV
and mean ARI, then combine with the same DBCV+ARI pooling used on the grid
(
dbcv_ari_mean_minmaxacross the leaderboard, or a resume-safe raw average).
best_score in flat summary rows remains mean DBCV (for DBCV heatmaps).
outer_score is the DBCV+ARI combo used to pick winners.
attach_outer_scores(df, *, use_minmax=True, dbcv_col='best_score', dbcv_std_col='best_score_std', ari_col='ari', ari_std_col='ari_std')
¶
Add outer_score / outer_score_std columns.
When use_minmax is true (default), min–max normalize DBCV and ARI across
rows then average — same pooling as dbcv_ari_mean_minmax on an MCS grid.
When false, use the resume-safe raw average per row.
Source code in pelinker/clustering_search_ranking.py
outer_score_from_summary_row(row)
¶
Raw DBCV+ARI outer score from a search summary row.
Source code in pelinker/clustering_search_ranking.py
pick_best_row(df, *, score_col=OUTER_SCORE_COL, std_col=OUTER_SCORE_STD_COL, tie_break_cols=(), use_minmax=True)
¶
Rank by outer DBCV+ARI score (descending), then lower std, then tie-break columns ascending.
Source code in pelinker/clustering_search_ranking.py
raw_outer_dbcv_ari_score(dbcv, ari, *, dbcv_std=0.0, ari_std=0.0)
¶
Resume-safe per-candidate combine: 0.5 * (dbcv + ari) when both finite.
Falls back to whichever metric is finite. Used for fusion proxies and mid-run progress when cross-leaderboard min-max is not appropriate.