開始使用免費開始

測試 Kaggle 論壇上的點子

可惜不是所有論壇貼文和 Kernels 都對你的模型有幫助。因此,與其盲目把點子加進你的 pipeline,不如先做測試。

這裡提供了一個函式 get_cv_score(),它接收訓練資料集作為引數,並回傳 3 折交叉驗證的整體驗證均方根誤差(RMSE)。train DataFrame 已經放在你的工作環境中。

你應該嘗試來自 Kaggle 論壇的不同建議,並檢查是否能提升你的驗證分數。

本練習屬於課程

用 Python 拿下 Kaggle 競賽

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Drop passenger_count column
new_train_1 = train.____('____', axis=1)

# Compare validation scores
initial_score = get_cv_score(train)
new_score = get_cv_score(new_train_1)

print('Initial score is {} and the new score is {}'.format(initial_score, new_score))
編輯並執行程式碼