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

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.

主站蜘蛛池模板: 秦安县| 黔江区| 吉安市| 新野县| 页游| 乐至县| 扶沟县| 泾源县| 岑溪市| 吉木乃县| 皮山县| 东城区| 桦甸市| 台湾省| 宜春市| 曲靖市| 扎赉特旗| 龙岩市| 嵩明县| 潼关县| 额敏县| 当雄县| 凭祥市| 龙游县| 灌南县| 敖汉旗| 康保县| 简阳市| 南靖县| 安图县| 石林| 互助| 三亚市| 灌云县| 璧山县| 兴化市| 磴口县| 乌海市| 临沧市| 开封县| 库伦旗|