Umap learn

From lza6/Armor-piercing-system-prompts · View interactive version

Umap learn is an AI agent skill from the GitHub repository lza6/Armor-piercing-system-prompts. Use the umap-learn package for UMAP dimensionality reduction, supervised and density workflows, aligned embeddings, plotting, and ParametricUMAP.

How to use this skill

Skill file

umap-learn Repo Skill

Use this repo skill when a task asks how to use umap-learn / umap for

Uniform Manifold Approximation and Projection: dimensionality reduction,

visualization embeddings, transform workflows, supervised UMAP, densMAP,

aligned embeddings, optional plotting, or optional ParametricUMAP.

Install and Import

pip install umap-learn
import umap
mapper = umap.UMAP()

Package facts:

Optional extras:

pip install "umap-learn[plot]"           # umap.plot helpers
pip install "umap-learn[parametric_umap]" # TensorFlow/Keras ParametricUMAP
pip install "umap-learn[tbb]"            # optional CPU optimization

Run CODE0 to

inspect a target environment and optional extras:

python scripts/check_umap_environment.py --json

Route Map

| Task | Read |

| --- | --- |

| Fit a standard UMAP embedding, tune base parameters, transform new rows, inverse transform, use sparse/precomputed inputs, or debug core API errors | core-embedding |

| Use supervised labels, semi-supervised targets, densMAP, density outputs, clustering interpretation, or outlier analysis | supervised-density |

| Align related slices/time periods, update aligned embeddings, or combine fitted UMAP models with intersection/union/contrast operators | aligned-composition |

| Use umap.plot points/connectivity/diagnostic/interactive helpers or fix optional plotting dependency failures | plotting-diagnostics |

| Use optional TensorFlow/Keras ParametricUMAP, neural encoders/decoders, reconstruction, save/load, callbacks, landmarks, or ONNX export | parametric-umap |

Fast Decision Guide

the seed later if speed matters more than reproducibility.

embedding compactness.

check precomputed-distance shape contracts before using metric="precomputed".

a downstream metric rather than only a visually separated plot.

transform/inverse paths are intentionally unavailable for densMAP.

dependencies should produce actionable install guidance, not block base UMAP.

irrelevant unless a separate optional neural backend is installed and verified.

Shared References

before setting up package dependencies or optional extras.

install/import, optional extras, performance, and staleness checks.

whether this generated skill is current for a checkout.

Minimal Import Check

import umap
print(umap.__version__)
print(umap.UMAP(n_neighbors=5, n_epochs=10, random_state=42))

For a runnable toy-data check, use the core sub-skill smoke script:

python sub-skills/core-embedding/scripts/umap_core_smoke.py --transform --json
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.