1๏ธโฃ One-Hot vs One-Cold Encoding
One-hot and one-cold are binary encoding schemes used to represent exclusive activation state in digital logic and machine learning
๐ฅ One-Hot Encoding
A binary vector where exactly one bit is $1$ and all others are $0$.
- Used in decoders, finite state machines, and categorical encoding
- Ensures mutual exclusivity
- Example:
[0, 0, 1, 0, 0]
๐ง One-Cold Encoding
A binary vector where exactly one bit is $0$ and all others are $1$.
- Rarely usedโsometimes in error detection or contrastive encoding
- Inverse of one-hot
- Example:
[1, 1, 0, 1, 1]
Notes One-hot is the dominant convention in logic design due to clarity and exclusivity
One-cold is valid but rare, and typically used in niche or contrastive contexts
Both are binary activation patterns with exactly one bit flipped from the rest
Last updated on