Learn Before
Concept

One-Hot Encoding

Because most classification problems lack a natural ordering among classes, categorical labels are typically represented using a one-hot encoding. A one-hot encoding is a vector with as many components as there are categories, where the element corresponding to the true category is set to 11 and all other elements are set to 00. For example, a label for three classes might be represented as the three-dimensional vector (1,0,0)(1, 0, 0).

0

1

Updated 2026-05-03

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L

Related