recsys-and-rankinglisted
Install: claude install-skill TranBaDat2607/claude-code-kaggle-grandmaster
# RecSys & Ranking Playbook
The winning architecture is almost always **two-stage**: generate ~50–200 candidates per
user/session with cheap methods (maximise recall@N), then re-rank them with a GBDT ranker using
rich user–item features.
## 1. Validation
Reproduce the test construction in time: train on weeks 1..k, label week k+1 (or truncate
sessions at a random point like the test). Measure **candidate recall@N** (upper bound for the
ranker) and the final metric (MAP@12, recall@20, NDCG). Use a subsample of users for speed;
confirm on more.
## 2. Candidate generation (union of sources)
- User history: recently interacted / repurchased items (often the strongest).
- Co-visitation matrices (item → items seen together within a time window), weighted by time
and event type (click/cart/order); separate matrices for clicks vs buys.
- Popularity: global and per segment (age bucket, region, category), recent-window popularity.
- Embedding similarity: item2vec/word2vec on sessions, ALS/BPR (implicit), two-tower models;
approximate kNN (faiss).
- Item-attribute similarity (same product group/colour), "bought together".
Track each source's recall contribution; tune N per source.
## 3. Ranker features
- User: activity counts, recency, diversity, price sensitivity, preferred categories.
- Item: popularity over multiple windows and trends, price, conversion rates, attributes.
- User × item: past interactions with the item / its category, time since last interaction,
co-visit