dnn-modeling

Train PyTorch MLP binary classifiers and generate AUC/KS/BCR/Lift evaluation reports.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires torch, pandas, numpy, scikit-learn, and includes scripts (resource) components.

What problem does it solve?

This Skill automates deep learning model training for binary classification and produces a complete, finance-ready evaluation report (AUC/KS/BCR/Lift and stability analysis) so you don’t have to assemble the workflow manually.

Core Features & Use Cases

  • MLP (DNN) Binary Modeling with PyTorch: trains a multi-layer perceptron for 0/1 classification using BatchNorm, Dropout, learning-rate scheduling, and early stopping.
  • Three-way dataset evaluation: performs standardized splits into Train/Val/OOT and evaluates generalization using consistent AUC/KS/BCR/Lift reporting.
  • Robust preprocessing & safety checks: reuses platform splitting, missing-value imputation (median + missing indicators), feature standardization, and a pre-training SafetyGate to detect time leakage and schema issues.
  • Use Case: You have a parquet/csv dataset with high-dimensional features and a 0/1 target; you want a production-style model card and performance diagnostics across OOT to compare against XGBoost and LR.

Quick Start

Train an MLP binary model on your dataset by asking the AI: "Use the dnn-modeling skill with --data_path ./data.parquet --target y_label --time_col busi_dt and write the outputs to ./outputs/dnn_run."

Frequently Asked Questions about dnn-modeling

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

FAQPage Schema
How do I train a PyTorch MLP for binary classification with train, validation, and OOT splits?

To train a PyTorch MLP for binary classification, this script automates dataset splitting into Train/Val/OOT, applies missing-value imputation and standardization, trains the model with early stopping, and outputs performance metrics like AUC and KS.

What is the best way to evaluate DNN model stability and generalization for finance risk scoring?

Evaluating DNN model stability for finance risk scoring requires out-of-time (OOT) validation and metrics like AUC, KS, BCR, Lift, and PSI stability, which this skill automatically calculates and reports to diagnose generalization.

Can I use PyTorch with BatchNorm and Dropout for tabular data classification?

Yes, you can use PyTorch with BatchNorm and Dropout for tabular data classification. This skill trains a multi-layer perceptron utilizing these techniques alongside learning-rate scheduling and early stopping to prevent overfitting.

How do I handle missing values and prevent time leakage when training an MLP on tabular data?

To handle missing values and prevent time leakage when training an MLP, the skill applies median imputation with missing indicators and uses a pre-training SafetyGate to detect time leakage and schema issues before model training begins.

Does this deep learning workflow support XGBoost and logistic regression comparison?

The deep learning workflow outputs standardized evaluation reports including AUC, KS, and BCR across OOT datasets, allowing you to directly compare the MLP model's performance against XGBoost and logistic regression baselines.

What data formats are supported for PyTorch MLP binary classification training?

Supported data formats for PyTorch MLP binary classification training include parquet and csv files. You provide the data path, target label, and optional time column via CLI inputs to initiate the automated training pipeline.