【问题标题】:Is the importance_type 'split' of lightgbm the same as the importance_type 'weight` in xgboost?lightgbm 的importance_type 'split' 和xgboost 中的importance_type 'weight` 一样吗?
【发布时间】:2020-11-18 17:47:43
【问题描述】:

lightgbm 的importance_type 'split' 和xgboost 的importance_type 'weight' 一样吗?

也就是说,以下是一样的吗?

booster.feature_importance(importance_type = 'split') # for lightgbm 

get_fscore(importance_type='weight') # for xgboost

【问题讨论】:

    标签: python machine-learning xgboost lightgbm


    【解决方案1】:

    尽管措辞略有不同,但它们确实是相同的。

    来自 LightGBM docs

    如果“拆分”,则结果包含该特征在模型中使用的次数。

    来自 XGBoost docs

    'weight':一个特征被用来在所有树上分割数据的次数。

    这些重要性类型分别是两个包中的默认选择,这并非巧合。

    【讨论】:

      猜你喜欢
      • 2022-01-23
      • 1970-01-01
      • 2023-04-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-20
      • 1970-01-01
      • 2019-01-05
      相关资源
      最近更新 更多