one hot encoding

Each category is represented by a vector (array) of N elements, where N is the number of categories.

For example, if car_color has eight possible categories, then the one-hot vector representing will have eight elements.

Exactly one of the elements in a one-hot vector has the value 1.0; all the remaining elements have the value 0.0.

Note: In a true one-hot encoding, only one element has the value 1.0. In a variant known as multi-hot encoding, multiple values can be 1.0.