- Deep Learning By Example
- Ahmed Menshawy
- 98字
- 2021-06-24 18:52:44
Missing value inputting
This approach is useful when you have categorical data. The intuition behind this approach is that missing values may correlate with other variables, and removing them will result in a loss of information that can affect the model significantly.
For example, if we have a binary variable with two possible values, -1 and 1, we can add another value (0) to indicate a missing value. You can use the following code to replace the null values of the Cabin feature with U0:
# replacing the missing value in cabin variable "U0"
df_titanic_data['Cabin'][df_titanic_data.Cabin.isnull()] = 'U0'
推薦閱讀
- 21小時學通AutoCAD
- PostgreSQL 11 Server Side Programming Quick Start Guide
- Getting Started with Oracle SOA B2B Integration:A Hands-On Tutorial
- 精通Windows Vista必讀
- Learning Apache Cassandra(Second Edition)
- 微型計算機控制技術
- 機器自動化控制器原理與應用
- 嵌入式Linux上的C語言編程實踐
- 自主研拋機器人技術
- Photoshop CS3圖層、通道、蒙版深度剖析寶典
- RPA(機器人流程自動化)快速入門:基于Blue Prism
- Cloudera Administration Handbook
- 電氣控制與PLC技術應用
- 智能生產線的重構方法
- Azure PowerShell Quick Start Guide