supervised-density
Use this sub-skill when labels, partial labels, density preservation, or
clustering/outlier interpretation are central to a umap.UMAP task.
Route here for
- Supervised
UMAP.fit(X, y=...)orfit_transform(X, y=...). - Semi-supervised class labels, including the categorical
-1unlabeled
convention.
- Choosing
target_metric,target_weight,target_n_neighbors, and
target_metric_kwds.
densmap=True,dens_lambda,dens_frac,dens_var_shift, and
output_dens=True.
- UMAP-assisted KMeans/HDBSCAN clustering, LOF-style outlier review, and
exploratory-analysis caveats.
Route elsewhere
- Base estimator mechanics, transform/inverse/update, sparse/precomputed data,
and general distance metrics: use the core-embedding sub-skill.
- Plot rendering and
umap.plot: use theplotting-diagnosticssub-skill. - Aligned multi-slice embeddings: use the
aligned-compositionsub-skill. - TensorFlow/Keras ParametricUMAP: use the
parametric-umapsub-skill.
Read first
Safe smoke helper
Run the bundled helper from this sub-skill directory for a no-network toy-data
check:
python scripts/supervised_density_smoke.py --help
Use options such as --partial-label-fraction, --densmap, --output-dens,
--cluster-method kmeans, and --outlier-check to exercise harder cases.
Operating cautions
- Labels guide topology; they do not guarantee better scientific structure.
- densMAP preserves relative local-density information more than standard UMAP,
but costs extra runtime and has transform/inverse limitations.
- Clusters and outliers from a UMAP embedding are exploratory until validated
against labels, stability, original-space neighbors, or domain evidence.