one-hot(独热的 / 一位有效的):常用于计算机科学与机器学习,指一种表示方式——在一个向量或编码中只有一个位置为 1(或“激活”),其余位置为 0,用来表示某个类别或状态。也常见于数字电路中的 one-hot encoding(独热编码)/ one-hot state(独热状态)。
/ˌwʌn ˈhɑːt/
Use one-hot encoding for categorical features like color.
对“颜色”这类类别特征使用独热编码。
The model performed better after we replaced integer labels with one-hot vectors to avoid implying an ordinal relationship between categories.
把整数标签换成独热向量后,模型表现更好,因为这避免了让类别之间看起来有“大小顺序”的误导。
one-hot 源自工程与计算领域的形象说法:one 表示“只有一个”,hot 在电路/逻辑语境里可理解为“被点亮、为真、处于激活状态(1)”。因此 one-hot 就是“只有一位为真(1),其余为假(0)”的编码或状态表示。