今天閱讀到一篇關於one-hot編碼的文章,這篇文章主要回答了兩個問題:
- 機器學習為什么需要one-hot編碼?
- 為什么不能直接用數據預測模型?
one-hot編碼把分類數據轉化為二進制格式,供機器學習使用。
下圖是one-hot編碼的一個實例:
[1] https://machinelearningmastery.com/why-one-hot-encode-data-in-machine-learning/
[2] https://hackernoon.com/what-is-one-hot-encoding-why-and-when-do-you-have-to-use-it-e3c6186d008f