![]() |
1
1
https://hackernoon.com/what-is-one-hot-encoding-why-and-when-do-you-have-to-use-it-e3c6186d008f )或者通过散列技巧( https://medium.com/value-stream-design/introducing-one-of-the-best-hacks-in-machine-learning-the-hashing-trick-bf6a9c8af18f ). 本质上,您需要将这些字符串转换为每个要素类别的1/0布尔值。 但是,某些模型(如基于树的模型,如随机林和梯度增强树)可以处理多个类别,因此只需将它们转换为数字类别类型(可以将字符串值保留为标签)。 |