executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
aligned-compositionCovers AlignedUMAP for related slices and fitted UMAP model composition with intersection, union, or contrast operators.
Independent GitHub snapshot · Automated classification · Original documentation governs
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 -.
umap.AlignedUMAP on a list of related datasets.n_neighbors or other AlignedUMAP parameters.alignment_regularisation or alignment_window_size.UMAP models over the same samples using intersection
(*), union (+), or contrast (-).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.
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.
A - B is not the same as B - A.update uses the same forward slice-to-slice relation
convention as fit; build the map from the existing last slice to the new
slice.