One Hot Vector

One hot vector is used to encode words into a vector of 0 and 1. The dimension for each word vector is the vocabulary size. For each word, one column is set to 1 and others are set to 0.

It is a very good metric if the feature is categorical and has medium cardinality.

Issues:

  1. Expensive computation as it becomes very large, very quickly
  2. High memory consumption due to it high sparsity.

Tips to use:

  1. Make the cardinal smaller by using other classes
  2. Make sure that unseen data on the test time is handled

References


Related Notes