pelinker.dim_selection.grids¶
PCA / UMAP dimension search grids and winner selection.
coarse_cells(pca_grid, umap_grid)
¶
Cartesian product of coarse PCA × UMAP grids (stable order).
parse_int_grid(spec, *, name)
¶
Parse a comma-separated int grid or pass through a sequence of ints.
Source code in pelinker/dim_selection/grids.py
pick_winner_row(df_results)
¶
Choose the best (pca, umap) row by outer DBCV+ARI score.
outer_score = min–max pooled mean DBCV + mean ARI across candidate cells
(same pooling as inner dbcv_ari_mean_minmax). Ties: lower outer std, then
smaller pca_components, then smaller umap_dim.
Source code in pelinker/dim_selection/grids.py
refine_cells(best_pca, best_umap, *, already=None)
¶
Local neighborhood around the coarse winner.
PCA: best±40 step 20 (clipped to >= 2).
UMAP: best±2 step 1 (clipped to >= 2).
Skips cells already evaluated when already is provided.