wenmin-wu/ds-skills/authorized-flag-table-split
Claude Code and agent skill by wenmin-wu/ds-skills
- community
Checking that the SKILL.md file is still in the repository.
Split a transaction table by a binary status flag (authorized vs. declined, paid vs. refunded) into two parallel sub-tables, then build the same aggregate feature pipeline on each — the declined-transaction features are usually as predictive as the authorized ones because they encode risk and friction the authorized stream alone hides
Install
npx vskill@latest install wenmin-wu/ds-skills/authorized-flag-table-splitSKILL.md
Overview
A common mistake on transaction panels is to filter authorized_flag == 'Y' and discard the rest. The declined rows are not noise — they encode declined-rate, declined-amount, declined-merchant-diversity, and other friction signals that strongly correlate with churn, fraud, and loyalty score. Top Elo Merchant solutions all built three parallel feature blocks: (1) full table, (2) authorized-only sub-table, (3) non-authorized sub-table — each through the same groupby(card_id).agg(...) pipeline. The model learns from the contrast: auth_amt_mean / nonauth_amt_mean, auth_count / total_count. Generalize to any binary flag — paid/refunded, success/failure, mobile/web.
Quick Start
Workflow
- Identify the binary flag (
authorized_flag,paid,is_success) - Split the transaction frame into two sub-frames — keep both, do not filter and forget
- Run the same aggregate pipeline (sum/mean/count/nunique/std) on each sub-frame, plus the union
- Suffix column names (
auth_*,nonauth_*) so feature importance is self-explanatory - Hand-craft 2-3 ratio features post-merge (
auth_rate,auth_amt_share) - Left-merge all three blocks onto the entity table; fill NaN with 0 only when 0 is semantically zero (e.g., count), not for means
Key Decisions
- Three blocks not two: the union block is not redundant — it gives the model an unconditional baseline that the splits are deviations from.
- Ratio features are critical:
auth_rate(declined fraction) is usually a top-10 feature on its own. - Fill strategy matters: counts → 0; means/stds → leave NaN so LightGBM can split on missingness directly.
- Generalizes beyond yes/no: any low-cardinality status column (3-5 values) can be split this way; cardinality > 10 is too many parallel blocks.
- Don't double-count in the union: the union features come from
tx, notpd.concat([auth, nonauth])— they are identical but the latter is slower.
References
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/tabular/authorized-flag-table-split/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/wenmin-wu/ds-skills/authorized-flag-table-split)