Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M6294

One-Hot Encoding

One-Hot Encoding
Learn & MetacognitionHigh supportLearning Science
Included
account_tree

Updated 2026-07-28

Loading revision record…

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.

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/3

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

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.

  • link
    zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E7%8B%AC%E7%83%ADZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS