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

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.

主站蜘蛛池模板: 祁门县| 高密市| 台南县| 静安区| 大新县| 抚顺市| 社旗县| 贵阳市| 平定县| 象山县| 深圳市| 栖霞市| 和田县| 和平区| 普定县| 西宁市| 桦川县| 孙吴县| 徐水县| 鄂托克前旗| 来宾市| 仙桃市| 宜春市| 临泉县| 长海县| 左贡县| 靖州| 岗巴县| 左贡县| 伊川县| 龙江县| 巴马| 崇左市| 东宁县| 丁青县| 集安市| 若尔盖县| 六安市| 小金县| 遂昌县| 策勒县|