aligned-composition
БесплатноБез исполняемых скриптовНе проверенCovers AlignedUMAP for related slices and fitted UMAP model composition with intersection, union, or contrast operators.
от lza6★ 19 звёзд на GitHubОб этом скилле
Aligned UMAP and Model Composition
Use this sub-skill when embeddings must stay comparable across related slices,
time periods, batches, or feature views, or when a task asks to combine fitted
UMAP models with *, +, or -.
Route Here For
umap.AlignedUMAPon a list of related datasets.- Relation dictionaries that map sample indices from one slice to the next.
- Online updates with a new slice and relation map.
- Per-slice parameter lists for
n_neighborsor other AlignedUMAP parameters. - Choosing
alignment_regularisationoralignment_window_size. - Combining two fitted
UMAPmodels over the same samples using intersection (*), union (+), or contrast (-).
Route Elsewhere
- Single-dataset fit/transform/sparse/precomputed workflows: read core-embedding.
- Supervised labels or densMAP: read supervised-density.
- Plotting aligned embeddings: read plotting-diagnostics.
- Parametric neural embeddings are out of scope for this sub-skill.
Quick AlignedUMAP Pattern
import umap
# X_slices is a list such as [X_t0, X_t1, X_t2].
# relations[t] must map row indices in X_slices[t] to row indices in
# X_slices[t + 1]. Keep those row positions stable after filtering/sorting.
relations = [
{0: 0, 1: 2, 2: 3},
{0: 1, 2: 2, 3: 4},
]
model = umap.AlignedUMAP(
n_neighbors=15,
alignment_regularisation=0.01,
alignment_window_size=3,
random_state=42,
).fit(X_slices, relations=relations)
embeddings = model.embeddings_
Run scripts/aligned_composition_smoke.py
for a tiny no-network aligned/composition check:
python scripts/aligned_composition_smoke.py --composition --json
For online updates, remember that update uses the same adjacent-slice row
index convention as fit: map rows in the previously fitted slice to rows in
the new slice you are adding.
Quick Composition Pattern
left_mapper = umap.UMAP(random_state=42).fit(left_view)
right_mapper = umap.UMAP(random_state=42).fit(right_view)
intersection = left_mapper * right_mapper
union = left_mapper + right_mapper
contrast = left_mapper - right_mapper
Only compose models trained on the same sample order and one-to-one sample correspondence. Do not use these operators to combine unrelated datasets.
Decision Points
- Slices versus views: use AlignedUMAP for ordered related slices; use composition operators for different views of the same rows.
- Relations: relation dictionaries map adjacent slices. Missing keys can represent absent correspondence, but accidental missing keys cause drift.
- Alignment strength: stronger regularisation makes slices more comparable but can suppress real temporal or batch-specific change.
- Window size: larger windows propagate alignment across more neighbouring slices; validate if distant slices should influence each other.
- Contrast is directional:
A - Bis not the same asB - A. - Update direction:
updateuses the same forward slice-to-slice relation convention asfit; build the map from the existing last slice to the new slice.
References
- Read workflows for aligned slices, updates, per-slice parameters, and model composition recipes.
- Read API reference for signatures, relation schema, and operator semantics.
- Read troubleshooting for relation and row-correspondence failures.
Установить aligned-composition в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл aligned-composition?
Covers AlignedUMAP for related slices and fitted UMAP model composition with intersection, union, or contrast operators.
Как установить скилл aligned-composition?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл aligned-composition запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
patterns
Find patterns worth sharing from recent PRs and repo history, both repeats to fix and good practices worth spreading. Use when a champion wants to know what…
от Anthropiccopilot-cli-quickstart
Use this skill when someone wants to learn GitHub Copilot CLI from scratch. Offers interactive step-by-step tutorials with separate Developer and…
от GitHubvardoger-analyze
Use when the user asks to personalize the GitHub Copilot CLI assistant, adapt Copilot to their style, use vardoger, or analyze their Copilot CLI conversation…
от GitHubpolicy-lookup
Find and explain company policies in plain language. Trigger with "what's our PTO policy", "can I work remotely from another country", "how do expenses work"…
от Anthropic