开始使用免费开始使用

为每个模型添加拟合值的增广数据

在本练习中,您将通过使用 augment() 为模型数据做增广,来为拟合效果最好的四个模型和最差的四个模型做进一步探索的准备。

本练习是课程的一部分

Tidyverse 中的机器学习

查看课程

练习说明

  • 使用 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
  ___
编辑并运行代码