skills/cv/weighted-embedding-blending/SKILL.md
Ensemble predictions from heterogeneous vision-language models by blending their output embeddings with fixed scalar weights in embedding space
npx skillsauth add wenmin-wu/ds-skills cv-weighted-embedding-blendingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When multiple models produce embeddings for the same input (e.g., CLIP k-NN, BLIP interrogator, fine-tuned ViT), blending their output embeddings with scalar weights is a simple yet effective ensemble. Unlike logit averaging, embedding blending works in the target space directly — each model's contribution is weighted and summed before submission.
import numpy as np
# Embeddings from three different models (shape: [n_samples, embed_dim])
emb_knn = predict_knn(images) # CLIP k-NN regression
emb_blip = predict_blip(images) # BLIP/CLIP interrogator + SentenceTransformer
emb_vit = predict_vit(images) # Fine-tuned ViT regression head
w_knn, w_blip, w_vit = 0.60, 0.15, 0.25
blended = w_knn * emb_knn + w_blip * emb_blip + w_vit * emb_vit
data-ai
Scaled Pinball Loss (SPL) metric for evaluating quantile forecasts, normalized by mean absolute successive differences of training data
data-ai
Walk backward through a time series and multiplicatively rescale segments when jumps exceed a fraction of the running mean to correct data collection anomalies
testing
Transform forecasting target to next/current ratio minus one so that optimizing MAE or squared error implicitly minimizes SMAPE
tools
Convert point forecasts to prediction intervals by scaling with logit-transformed quantile ratios passed through a Normal CDF