One-Hot Encoding
One-hot encoding is a representation of a label as a vector where the value at the index corresponding to the label is 1, and all other values are 0. One-hot encoding is popular in classification problems where, for example, if there are two classes, then elements of class 1 are labeled (1, 0), and elements of class 2 are labeled (0, 1). This makes it convenient to use certain loss functions, such as the cross-entropy loss.