lr-modeling

Convert features into WoE bins and fit Logistic Regression for risk scorecards.

580|66|Updated Apr 21, 2025
One-click install
npx skills add https://github.com/aliyun/qwen-dianjin --skill lr-modeling
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: lr-modeling
Source: https://github.com/aliyun/qwen-dianjin/tree/main/DianJin-SKILLS/financial-engineering-expert/lr-modeling
Command: npx skills add https://github.com/aliyun/qwen-dianjin --skill lr-modeling

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires scikit-learn, numpy, pandas, joblib, optbinning, scipy, xgboost.

What problem does it solve?

This Skill solves the problem of producing an explainable binary risk scorecard when you need a transparent model for regulated or business-auditable decisioning.

Core Features & Use Cases

  • WoE optimal binning + Logistic Regression: Converts raw features into WoE-encoded bins, trains a Logistic Regression model, and derives a standard scorecard mapping.
  • Regulatory-friendly artifacts: Outputs coefficient tables, WoE-to-score contributions, a deployable scorecard JSON (bin-to-score mapping), and a Markdown modeling report with AUC/KS/BCR and stability sections.
  • Uses standard data splits and evaluations: Reuses the platform’s three-stage split (train/val/oot), AUC/KS evaluation, and stability analysis hooks; designed for production workflow consistency.

Quick Start

Use the lr-modeling skill with your dataset file, specifying the target column and optional time column, to generate the WoE+LR scorecard artifacts and evaluation report in an output directory.

Frequently Asked Questions about lr-modeling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an explainable credit risk scorecard with WoE binning and logistic regression?▼

To build an explainable credit risk scorecard, this Skill converts input features into WoE optimal bins and fits a Logistic Regression model, outputting transparent bin-to-score mappings for regulated, auditable decisioning.

What evaluation metrics are provided for binary risk modeling?▼

Binary risk modeling outputs include standard AUC and KS evaluation metrics, alongside OOT validation and stability monitoring reports, ensuring your scorecard meets production workflow consistency requirements.

How do I prepare my dataset for WoE+LR scorecard development?▼

For WoE+LR scorecard development, you need a pre-built dataset with a 0/1 target column, an optional time column for OOT validation, and a three-stage splitting configuration across train, validation, and out-of-time sets.

Can I use scikit-learn and xgboost dependencies for logistic regression risk modeling?▼

Yes, the logistic regression risk modeling workflow leverages scikit-learn for the LR model and includes xgboost alongside optbinning and scipy to support WoE optimal binning and statistical computations.

What artifacts are generated when creating a white-box scorecard?▼

Creating a white-box scorecard generates coefficient tables, WoE-to-score contributions, a deployable scorecard JSON with bin-to-score mapping, and a Markdown modeling report detailing AUC/KS/BCR and stability sections.

When should I choose WoE+LR over other risk modeling approaches?▼

Choose WoE+LR over other risk modeling approaches when you need a transparent, white-box model for regulated or business-auditable decisioning, as it provides clear WoE-to-score contributions rather than opaque predictions.