# umap-learn

This skill guides UMAP-based dimensionality reduction, 2D/3D embeddings, and clustering preparation. Use it when an agent needs supervised or semi-supervised UMAP workflows.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2000 installs · ★ 54652
- Author: K-Dense-AI
- License: LicenseRef-BSD-3-Clause-license · policy=link-only · description only; the file stays with the author
- Source: https://github.com/K-Dense-AI/scientific-agent-skills/tree/HEAD/skills/umap-learn/SKILL.md
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/skills/umap-learn

## What it does

The skill covers `umap-learn` for nonlinear dimensionality reduction, 2D/3D embeddings, and feature preparation before clustering. It guides parameter choices for `n_neighbors`, `min_dist`, `n_components`, and `metric`, with separate fit and transform steps through the `scikit-learn` estimator interface. Label-aware workflows include supervised and semi-supervised UMAP, DensMAP, AlignedUMAP, and Parametric UMAP.

Examples use `StandardScaler` and `Matplotlib` alongside UMAP. Python 3.9+ and `umap-learn` are required; HDBSCAN, Matplotlib, and TensorFlow with Keras 3 are optional for specific workflows. Network access is needed to install the package, while local fitting does not need it.

Choose the embedding size according to the task: 2–3 dimensions are used for visualization, while 5–10 can support clustering preprocessing. UMAP axes, island areas, and gaps between groups do not carry calibrated physical or probabilistic meaning. For predictive work, fit preprocessing and embeddings on training data only.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add K-Dense-AI/scientific-agent-skills --skill umap-learn -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/umap-learn/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/umap-learn/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add K-Dense-AI/scientific-agent-skills --skill umap-learn -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/umap-learn/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add K-Dense-AI/scientific-agent-skills --skill umap-learn -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/umap-learn/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install K-Dense-AI/scientific-agent-skills umap-learn
```

2. **Manually: put the files in place**
- File: `.github/skills/umap-learn/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add K-Dense-AI/scientific-agent-skills --skill umap-learn -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/K-Dense-AI/scientific-agent-skills --path skills/umap-learn
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/umap-learn/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add K-Dense-AI/scientific-agent-skills --skill umap-learn -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/K-Dense-AI/scientific-agent-skills/tree/HEAD/skills/umap-learn/SKILL.md

## When to use it
- build 2D and 3D embeddings from feature data
- prepare higher-dimensional embeddings for clustering
- tune `n_neighbors`, `min_dist`, and `metric`
- guide embeddings with supervised labels
- compare local and broader neighborhood structure

## Example prompts
- Create a 2D UMAP embedding for `data`, choose suitable parameters, and plot the result.
- Prepare these features for clustering with 10 UMAP components and explain the metric choice.
- Run supervised UMAP with `labels` while keeping test data outside the fit.

## Similar
- [skill-creator](https://affpapa.org/en/nevibecode/skills/skill-creator.md) — skill · 414180 installs
- [writing-for-agents](https://affpapa.org/en/nevibecode/skills/writing-for-agents.md) — skill · 466719 installs
- [media-use](https://affpapa.org/en/nevibecode/skills/media-use.md) — skill · 1100000 installs
- [mcp-builder](https://affpapa.org/en/nevibecode/skills/mcp-builder.md) — skill · 130949 installs
- [subagent-driven-development](https://affpapa.org/en/nevibecode/skills/subagent-driven-development.md) — skill · 237746 installs
- [orchestration](https://affpapa.org/en/nevibecode/skills/orchestration.md) — skill · 349800 installs

From the same set: [k-dense-ai/scientific-agent-skills](https://affpapa.org/en/nevibecode/by/k-dense-ai/scientific-agent-skills.md) — 159 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
