为每个模型添加拟合值的增广数据
在本练习中,您将通过使用 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
___