datanalysis-credit-risk
Credit risk data cleaning and variable screening pipeline for pre-loan modeling. Use when working with raw credit data that needs quality assessment, missing value analysis, or variable selection before modeling. it covers data loading and formatting, abnormal period filtering, missing rate calculation, high-missing variable removal,low-IV variable filtering, high-PSI variable removal, Null Importance denoising, high-correlation variable removal, and cleaning report generation. Applicable scenarios arecredit risk data cleaning, variable screening, pre-loan modeling preprocessing.
Best use case
datanalysis-credit-risk is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Credit risk data cleaning and variable screening pipeline for pre-loan modeling. Use when working with raw credit data that needs quality assessment, missing value analysis, or variable selection before modeling. it covers data loading and formatting, abnormal period filtering, missing rate calculation, high-missing variable removal,low-IV variable filtering, high-PSI variable removal, Null Importance denoising, high-correlation variable removal, and cleaning report generation. Applicable scenarios arecredit risk data cleaning, variable screening, pre-loan modeling preprocessing.
Teams using datanalysis-credit-risk should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/datanalysis-credit-risk/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How datanalysis-credit-risk Compares
| Feature / Agent | datanalysis-credit-risk | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Credit risk data cleaning and variable screening pipeline for pre-loan modeling. Use when working with raw credit data that needs quality assessment, missing value analysis, or variable selection before modeling. it covers data loading and formatting, abnormal period filtering, missing rate calculation, high-missing variable removal,low-IV variable filtering, high-PSI variable removal, Null Importance denoising, high-correlation variable removal, and cleaning report generation. Applicable scenarios arecredit risk data cleaning, variable screening, pre-loan modeling preprocessing.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for ChatGPT
Find the best AI skills to adapt into ChatGPT workflows for research, writing, summarization, planning, and repeatable assistant tasks.
AI Agent for Product Research
Browse AI agent skills for product research, competitive analysis, customer discovery, and structured product decision support.
AI Agent for SaaS Idea Validation
Use AI agent skills for SaaS idea validation, market research, customer discovery, competitor analysis, and documenting startup hypotheses.
SKILL.md Source
# Data Cleaning and Variable Screening ## Quick Start ```bash # Run the complete data cleaning pipeline python ".github/skills/datanalysis-credit-risk/scripts/example.py" ``` ## Complete Process Description The data cleaning pipeline consists of the following 11 steps, each executed independently without deleting the original data: 1. **Get Data** - Load and format raw data 2. **Organization Sample Analysis** - Statistics of sample count and bad sample rate for each organization 3. **Separate OOS Data** - Separate out-of-sample (OOS) samples from modeling samples 4. **Filter Abnormal Months** - Remove months with insufficient bad sample count or total sample count 5. **Calculate Missing Rate** - Calculate overall and organization-level missing rates for each feature 6. **Drop High Missing Rate Features** - Remove features with overall missing rate exceeding threshold 7. **Drop Low IV Features** - Remove features with overall IV too low or IV too low in too many organizations 8. **Drop High PSI Features** - Remove features with unstable PSI 9. **Null Importance Denoising** - Remove noise features using label permutation method 10. **Drop High Correlation Features** - Remove high correlation features based on original gain 11. **Export Report** - Generate Excel report containing details and statistics of all steps ## Core Functions | Function | Purpose | Module | |------|------|----------| | `get_dataset()` | Load and format data | references.func | | `org_analysis()` | Organization sample analysis | references.func | | `missing_check()` | Calculate missing rate | references.func | | `drop_abnormal_ym()` | Filter abnormal months | references.analysis | | `drop_highmiss_features()` | Drop high missing rate features | references.analysis | | `drop_lowiv_features()` | Drop low IV features | references.analysis | | `drop_highpsi_features()` | Drop high PSI features | references.analysis | | `drop_highnoise_features()` | Null Importance denoising | references.analysis | | `drop_highcorr_features()` | Drop high correlation features | references.analysis | | `iv_distribution_by_org()` | IV distribution statistics | references.analysis | | `psi_distribution_by_org()` | PSI distribution statistics | references.analysis | | `value_ratio_distribution_by_org()` | Value ratio distribution statistics | references.analysis | | `export_cleaning_report()` | Export cleaning report | references.analysis | ## Parameter Description ### Data Loading Parameters - `DATA_PATH`: Data file path (best are parquet format) - `DATE_COL`: Date column name - `Y_COL`: Label column name - `ORG_COL`: Organization column name - `KEY_COLS`: Primary key column name list ### OOS Organization Configuration - `OOS_ORGS`: Out-of-sample organization list ### Abnormal Month Filtering Parameters - `min_ym_bad_sample`: Minimum bad sample count per month (default 10) - `min_ym_sample`: Minimum total sample count per month (default 500) ### Missing Rate Parameters - `missing_ratio`: Overall missing rate threshold (default 0.6) ### IV Parameters - `overall_iv_threshold`: Overall IV threshold (default 0.1) - `org_iv_threshold`: Single organization IV threshold (default 0.1) - `max_org_threshold`: Maximum tolerated low IV organization count (default 2) ### PSI Parameters - `psi_threshold`: PSI threshold (default 0.1) - `max_months_ratio`: Maximum unstable month ratio (default 1/3) - `max_orgs`: Maximum unstable organization count (default 6) ### Null Importance Parameters - `n_estimators`: Number of trees (default 100) - `max_depth`: Maximum tree depth (default 5) - `gain_threshold`: Gain difference threshold (default 50) ### High Correlation Parameters - `max_corr`: Correlation threshold (default 0.9) - `top_n_keep`: Keep top N features by original gain ranking (default 20) ## Output Report The generated Excel report contains the following sheets: 1. **汇总** - Summary information of all steps, including operation results and conditions 2. **机构样本统计** - Sample count and bad sample rate for each organization 3. **分离OOS数据** - OOS sample and modeling sample counts 4. **Step4-异常月份处理** - Abnormal months that were removed 5. **缺失率明细** - Overall and organization-level missing rates for each feature 6. **Step5-有值率分布统计** - Distribution of features in different value ratio ranges 7. **Step6-高缺失率处理** - High missing rate features that were removed 8. **Step7-IV明细** - IV values of each feature in each organization and overall 9. **Step7-IV处理** - Features that do not meet IV conditions and low IV organizations 10. **Step7-IV分布统计** - Distribution of features in different IV ranges 11. **Step8-PSI明细** - PSI values of each feature in each organization each month 12. **Step8-PSI处理** - Features that do not meet PSI conditions and unstable organizations 13. **Step8-PSI分布统计** - Distribution of features in different PSI ranges 14. **Step9-null importance处理** - Noise features that were removed 15. **Step10-高相关性剔除** - High correlation features that were removed ## Features - **Interactive Input**: Parameters can be input before each step execution, with default values supported - **Independent Execution**: Each step is executed independently without deleting original data, facilitating comparative analysis - **Complete Report**: Generate complete Excel report containing details, statistics, and distributions - **Multi-process Support**: IV and PSI calculations support multi-process acceleration - **Organization-level Analysis**: Support organization-level statistics and modeling/OOS distinction
Related Skills
write-coding-standards-from-file
Write a coding standards document for a project using the coding styles from the file(s) and/or folder(s) passed as arguments in the prompt.
workiq-copilot
Guides the Copilot CLI on how to use the WorkIQ CLI/MCP server to query Microsoft 365 Copilot data (emails, meetings, docs, Teams, people) for live context, summaries, and recommendations.
winmd-api-search
Find and explore Windows desktop APIs. Use when building features that need platform capabilities — camera, file access, notifications, UI controls, AI/ML, sensors, networking, etc. Discovers the right API for a task and retrieves full type details (methods, properties, events, enumeration values).
winapp-cli
Windows App Development CLI (winapp) for building, packaging, and deploying Windows applications. Use when asked to initialize Windows app projects, create MSIX packages, generate AppxManifest.xml, manage development certificates, add package identity for debugging, sign packages, publish to the Microsoft Store, create external catalogs, or access Windows SDK build tools. Supports .NET (csproj), C++, Electron, Rust, Tauri, and cross-platform frameworks targeting Windows.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
web-design-reviewer
This skill enables visual inspection of websites running locally or remotely to identify and fix design issues. Triggers on requests like "review website design", "check the UI", "fix the layout", "find design problems". Detects issues with responsive design, accessibility, visual consistency, and layout breakage, then performs fixes at the source code level.
web-coder
Expert 10x engineer with comprehensive knowledge of web development, internet protocols, and web standards. Use when working with HTML, CSS, JavaScript, web APIs, HTTP/HTTPS, web security, performance optimization, accessibility, or any web/internet concepts. Specializes in translating web terminology accurately and implementing modern web standards across frontend and backend development.
vscode-ext-localization
Guidelines for proper localization of VS Code extensions, following VS Code extension development guidelines, libraries and good practices
vscode-ext-commands
Guidelines for contributing commands in VS Code extensions. Indicates naming convention, visibility, localization and other relevant attributes, following VS Code extension development guidelines, libraries and good practices
update-specification
Update an existing specification file for the solution, optimized for Generative AI consumption based on new requirements or updates to any existing code.
update-markdown-file-index
Update a markdown file section with an index/table of files from a specified folder.
update-llms
Update the llms.txt file in the root folder to reflect changes in documentation or specifications following the llms.txt specification at https://llmstxt.org/