Skip to main content
 首页 » 编程设计

python之lightGBM 中的分类特征是如何编码的

2025年01月19日8hnrainll

LightGBM 支持分类变量。我想知道它是如何编码的。它似乎不是一种热编码,因为该算法非常快(我尝试使用花费大量时间进行一种热编码的数据)。

请您参考如下方法:

https://github.com/Microsoft/LightGBM/issues/699#issue-243313657

The basic idea is sorting the histogram according to it's accumulate values (sum_gradient / sum_hessian), then find the best split on the sorted histogram, just like the numerical features.