One-Hot Encoding
Updated 2026-07-28
Summary
One-hot is used in digital circuits and machine learning to represent a special bit group or vector, where only one bit is allowed to be 1 and all others must be 0. It is called one-hot because there can only be one 1; if the opposite is true, with only one 0 and the rest 1, it is called one-cold. In statistics, dummy variables represent a similar concept.
Definition
One-hot is used in digital circuits and machine learning to represent a special bit group or vector, where only one bit is allowed to be 1 and all others must be 0. It is called one-hot because there can only be one 1; if the opposite is true, with only one 0 and the rest 1, it is called one-cold. In statistics, dummy variables represent a similar concept.
Introduction
How to use
One-hot is used in digital circuits and machine learning to represent a special bit group or vector, where only one bit is allowed to be 1 and all others must be 0. It is called one-hot because there can only be one 1; if the opposite is true, with only one 0 and the rest 1, it is called one-cold. In statistics, dummy variables represent a similar concept.
Mechanism
Convert categorical variables into 0/1 vectors: each category occupies one dimension, with only that dimension being 1 and the rest 0. The mechanism is a discretized representation.
Practice
In progress 0/3Practice this model in one real situation:
Cases
- Standard preprocessing before feeding categorical features such as 'color' into a model.
Common pitfalls
- High cardinality of categories can lead to dimensional explosion; consider using embeddings instead.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E7%8B%AC%E7%83%ADverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS