- 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'
推薦閱讀
- Visual C# 2008開發(fā)技術(shù)詳解
- PHP開發(fā)手冊
- 西門子S7-200 SMART PLC實例指導(dǎo)學(xué)與用
- 21天學(xué)通Java Web開發(fā)
- 菜鳥起飛系統(tǒng)安裝與重裝
- 空間站多臂機器人運動控制研究
- Visual C++項目開發(fā)案例精粹
- 自動化生產(chǎn)線安裝與調(diào)試(三菱FX系列)(第二版)
- 網(wǎng)絡(luò)脆弱性掃描產(chǎn)品原理及應(yīng)用
- 大數(shù)據(jù)案例精析
- 簡明學(xué)中文版Photoshop
- C#求職寶典
- 智能+:制造業(yè)的智能化轉(zhuǎn)型
- C#編程兵書
- 單片機C51應(yīng)用技術(shù)