各モデルの予測値を Augment する
この演習では、augment() を使ってモデルのデータを拡張し、最も当てはまりの良い4つと悪い4つのモデルを、さらに探索できるように準備します。
この演習はコースの一部です
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
___