開始使用免費開始

為每個模型擴增擬合值

在這個練習中,你要使用 augment() 將模型資料擴增,為接下來的探索準備出擬合度最佳與最差的四個模型。

本練習屬於課程

Tidyverse 的 Machine Learning

檢視課程

練習說明

  • 使用 best_fit 資料框,建立擴增後的資料框,並以 unnest() 簡化,組成 best_augmented 資料框。
  • 使用 worst_fit 資料框,建立擴增後的資料框,並以 unnest() 簡化,組成 worst_augmented 資料框。

動手互動練習

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

best_augmented <- best_fit %>% 
  # Build the augmented data frame for each country model
  mutate(augmented = ___) %>% 
  # Expand the augmented data frames
  ___

worst_augmented <- worst_fit %>% 
  # Build the augmented data frame for each country model
  mutate(augmented = ___) %>% 
  # Expand the augmented data frames
  ___
編輯並執行程式碼