Generating dummy variables from a vector of strings (one-hot encoding)

Here is a pretty complete list for how to do one-hot encoding.

It looks like the easiest might be StatsBase.indicatormat

3 Likes