官术网_书友最值得收藏!

One-hot encoding

One-hot encoding is a vectorization technique for labeled data, especially categorical data. In the case of binary labels, target variables will be presented as [0, 1], [1, 0]. The same representation for three classes will appear as [0, 0, 1], [0, 1, 0], [1, 0, 0]. This type of representation can support any number of categories. The main advantage of one-hot encoding is that it treats all categorical data equally, in contrast to arbitrary categorical labels. For instance, categories to represent colors such as red, green, and blue, may use integers such as 0, 1, and 2. Although there is no intrinsic order for colors, some ML models may treat such input as if it has an order. This is avoided in one-hot encoding, as it does not assume any order in the categorical values since they are binary encoded.

主站蜘蛛池模板: 大同县| 土默特右旗| 卓资县| 昌邑市| 饶平县| 富平县| 三江| 甘谷县| 桐梓县| 社旗县| 沛县| 安西县| 龙门县| 于都县| 东丽区| 灌阳县| 上饶县| 和田市| 阿坝| 启东市| 临泽县| 海安县| 金堂县| 关岭| 穆棱市| 琼海市| 阿克陶县| 高青县| 乐业县| 苍溪县| 绥江县| 吉木萨尔县| 武川县| 濮阳县| 淮阳县| 荔浦县| 崇阳县| 罗定市| 栖霞市| 陵川县| 开鲁县|