logo
Loading...

關於特徵在 train and test 是不同 - Cupoy

在 作業df_train = df_train.drop(['PassengerId', 'Surv...

ml100-3-d12

關於特徵在 train and test 是不同

2019/10/02 下午 09:00
機器學習共學討論版
William Mok
觀看數:24
回答數:1
收藏數:0
ml100-3-d12

在 作業

df_train = df_train.drop(['PassengerId', 'Survived'] , axis=1)

df_test = df_test.drop(['PassengerId'] , axis=1)


在 Sample

df_train = df_train.drop(['Id', 'SalePrice'] , axis=1)

df_test = df_test.drop(['Id'] , axis=1)

以上兩組中, 在 test 都是沒有 drop Survived,SalePrice. 是否這兩個是目標 特徵, 所以要在 test 出現, 請問為何要出現?


謝謝

William

回答列表

  • 2019/10/02 下午 11:36
    張維元 (WeiYuan)
    贊同數:1
    不贊同數:0
    留言數:2

    不是「要在 test 出現」,是因為 test dataset 本來就沒有目標欄位。