You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

LightGBM中feature_importances_与feature_importance()的区别及默认指标问询

LightGBM Scikit-learn API 特征重要性默认类型说明

LightGBM的Scikit-learn接口(如LGBMClassifier)的feature_importances_属性,默认对应原生Booster.feature_importance()方法中的**"split"**类型:

  • "split":统计的是特征被作为树节点划分依据的总次数
  • 若需要切换为"gain"类型(统计特征在所有划分中带来的总增益,和Scikit-learn的"mean decrease in impurity"逻辑相近但计算细节不同),可以在初始化模型时指定参数importance_type='gain',或者训练后通过model.booster_.feature_importance(importance_type='gain')获取对应结果

内容的提问来源于stack exchange,提问作者Yankai Sheng

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.03 17:39:49