xgb-tuning

Optimize XGBoost hyperparameters via diagnostic-driven Optuna TPE search.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

帮你在 XGBoost 基线模型基础上,针对过拟合或欠拟合进行有方向性的超参数调优,并通过诊断报告让你掌控每一轮迭代是否值得继续。

Core Features & Use Cases

  • XGBoost 超参数的唯一调优入口:当用户需要“帮我调参/优化模型/处理过拟合”时,提供结构化调优流程与参数建议。
  • 诊断驱动的约束式搜索:基于过拟合/欠拟合判定收紧或抬高搜索空间,用 Optuna TPE 进行贝叶斯优化(并输出每轮诊断报告以供确认)。
  • 金融风控友好策略:围绕 Gap 与 KS/AUC 等指标提供终止条件、模式切换(交互式/AUTO)以及“只调超参数、不做特征探索”的边界约束。
  • 强制前置条件:需要先用 xgb-modeling 训练出基线模型,避免在缺少基线的情况下盲目调参。

Quick Start

Ask the AI to tune the XGBoost hyperparameters for your binary classification dataset using the prepared baseline model, with inputs provided as --data_path, --target, and --features, and to run one diagnostic-guided tuning round in interactive mode for approval.

Frequently Asked Questions about xgb-tuning

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

FAQPage Schema
How do I optimize XGBoost hyperparameters to control overfitting in binary classification?

Optimize XGBoost hyperparameters to control binary classification overfitting by applying diagnostic-driven constrained Optuna TPE search. This workflow evaluates train and validation data gaps to dynamically tighten or expand the search space, producing a structured final parameter set that balances generalization.

What is diagnostic-driven hyperparameter tuning for risk modeling?

Diagnostic-driven hyperparameter tuning for risk modeling is a constrained Optuna TPE search workflow that evaluates KS, AUC, and overfitting gaps per round. It outputs structured diagnostic reports to guide whether to continue iterations, ensuring the final parameters meet finance-style constraints.

Do I need a baseline model before tuning XGBoost hyperparameters?

Yes, you need a trained baseline model before tuning XGBoost hyperparameters. This Skill requires pre-existing train, validation, and out-of-time data to perform diagnostic-driven optimization, avoiding blind parameter search without a baseline reference.

How do I tune XGBoost parameters using Optuna for finance datasets?

Tune XGBoost parameters using Optuna for finance datasets by running an interactive or AUTO mode search that evaluates KS and AUC metrics. The workflow uses validation data for early stopping and out-of-time data to verify the final parameter set under finance-style constraints.

What are the limitations of using diagnostic-driven tuning for XGBoost?

Limitations of diagnostic-driven tuning include strict boundaries against feature exploration and engineering, focusing solely on hyperparameter optimization. It requires separate train, validation, and out-of-time datasets, and depends on a pre-trained baseline model to function correctly.