one-hot encoding / dummy encoding / hot encoded

one-hot encoding

  • Each category to generate a Boolean columns, which may be only a value of 1. The sample which is also known as one-hot encoding.
    The table on the left in the figure on the right is converted into the form expressed using:

  • Put into the category of numerical values ​​may be used
  • Join nonlinear
  • Converting the distance information obtained good - an equal distance

  • pandas.get_dummies(data, prefix=None)
    • data:array-like, Series, or DataFrame
    • prefix: group name

Guess you like

Origin www.cnblogs.com/oklizz/p/11493872.html