Converting a category column to a boolean indicator matrix — one column per sorted unique category.
highlighted = computed this step
Input column
The raw category column — each entry is a color label.
input column
One-hot matrix
Sorted unique categories become column names. Each row marks its category with one, all others with zero.
one-hot matrix