- Python Machine Learning By Example
- Yuxi (Hayden) Liu
- 139字
- 2021-07-02 12:41:35
Label encoding
Humans are able to deal with various types of values. Machine learning algorithms (with some exceptions) need numerical values. If we offer a string such as Ivan, unless we're using specialized software, the program won't know what to do. In this example, we're dealing with a categorical feature—names, probably. We can consider each unique value to be a label. (In this particular example, we also need to decide what to do with the case—is Ivan the same as ivan?). We can then replace each label with an integer—label encoding.
The following example shows how label encoding works:

This approach can be problematic, because the learner may conclude that there's an order. For example, Asia and North America in the preceding case differ by 4 after encoding, which is a bit counter-intuitive.
- 數據展現的藝術
- Microsoft Dynamics CRM Customization Essentials
- 電氣自動化專業英語(第3版)
- Getting Started with MariaDB
- Cloud Analytics with Microsoft Azure
- Windows XP中文版應用基礎
- Pig Design Patterns
- Photoshop CS3圖層、通道、蒙版深度剖析寶典
- 大數據驅動的設備健康預測及維護決策優化
- 單片機技術一學就會
- RedHat Linux用戶基礎
- Xilinx FPGA高級設計及應用
- Keras Reinforcement Learning Projects
- 軟件質量管理實踐
- 微計算機原理及應用