Config
配置文件
配置文件主要由特征筛选、模型训练两个部分组成
CONFIG = {
# 特征筛选调用的参数
# 1.阈值
"na_threshold": 0.95,
"correlation_threshold": 0.95,
"importance_cumsum_threshold": 0.95,
# 2.计算特征重要度需要的参数
"params": {
"n_estimators": 500,
"max_depth": 3,
"learning_rate": 0.1,
"boosting_type": "gbdt",
"importance_type": "gain",
"n_jobs": -1
},
"kfold": "StratifiedKFold",
"groups": None,
"n_splits": 5,
# 3.模型通过cv自动筛选特征需要的参数
"incre_params":{
"max_depth": 3,
"learning_rate": 0.1,
"num_boost_round": 200,
"metrics": "auc",
"verbose_eval": 200,
"verbose": -1,
"early_stopping_rounds": 100,
"seed": 10
},
"total_iter": 100,
"step": 2,
"auc_interval": 0.001,
# 建模调用的参数
"lgb_params": {
"n_estimators": 200,
"max_depth": 2,
"learning_rate": 0.1,
"boosting_type": "gbdt",
"importance_type": "gain",
"n_jobs": -1
}
}