dnn-tuning

Tune DNN hyperparameters for binary classification using Optuna TPE search.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps you systematically tune a deep neural network (DNN) for binary classification by diagnosing overfitting/underfitting and then running Optuna-based search over network architecture and training hyperparameters to improve validation performance and generalization on OOT.

Core Features & Use Cases

  • DNN Hyperparameter Optimization: Uses Optuna TPE Bayesian optimization to search both model structure (n_layers, layer_width, dropout) and training parameters (learning_rate, weight_decay, batch_size).
  • Diagnosis-Driven Constrained Search Space: Builds a dynamic search space guided by train/val gaps to reduce overfitting or address underfitting.
  • Two Execution Modes (Safe by Default): Interactive mode pauses each round for user feedback, while AUTO mode iterates automatically until convergence criteria are met.
  • Workflow Fit for Finance Risk Modeling: Works on the project’s classic three-split setup (train/val/OOT), where val drives early decisions and OOT is used for final reporting. Use cases include credit scoring / churn risk models where AUC/KS quality matters.

Quick Start

Ask the agent to run DNN tuning with your data path and target column in interactive mode, assuming you have already trained a baseline model with dnn-modeling.

Frequently Asked Questions about dnn-tuning

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

FAQPage Schema
How do I tune DNN hyperparameters to improve AUC and KS for binary classification?

Diagnosis-driven hyperparameter tuning analyzes train and validation performance gaps to identify overfitting or underfitting, then dynamically constrains the Optuna TPE Bayesian search space to target the specific diagnosed issue for improved AUC and KS.

What is the best way to diagnose overfitting in a deep neural network for finance risk modeling?

Diagnose DNN overfitting by evaluating train and validation performance gaps across classic three-split data setups, then adjusting dropout, weight decay, and network architecture based on the diagnosis to improve OOT generalization.

Do I need a pre-trained baseline model before starting Optuna hyperparameter tuning?

Yes, Optuna hyperparameter tuning requires a pre-trained DNN baseline model created via dnn-modeling, providing the initial train/val/OOT split structure needed to diagnose behavior and guide the constrained search space.

Can I automate multi-round DNN tuning without manual intervention?

Yes, you can automate multi-round DNN tuning using AUTO mode, which iterates automatically until convergence criteria are met, while interactive mode pauses each round for user feedback.

Which DNN architecture and training parameters are optimized during Bayesian search?

Bayesian search optimizes DNN architecture parameters including n_layers, layer_width, and dropout, alongside training parameters like learning_rate, weight_decay, and batch_size to maximize validation performance.