One-Hot Encoding

Quick definition

Representing a categorical value with separate binary indicators for its possible categories.

Representing a categorical value with separate binary indicators for its possible categories.

One-hot encoding avoids imposing a false numeric order, but high-cardinality features can produce large sparse vectors.

Example: A shipping-mode column becomes separate air, sea, and road indicator columns.

Common use cases: Categorical data preparation.

Examples

  • A shipping-mode column becomes separate air, sea, and road indicator columns.

Use cases

  • Categorical data preparation.

Frequently asked questions

What is One-Hot Encoding?

Representing a categorical value with separate binary indicators for its possible categories.

What should I know about One-Hot Encoding?

One-hot encoding avoids imposing a false numeric order, but high-cardinality features can produce large sparse vectors.

Categories and tags