เพิ่มค่าที่ฟิตแล้วให้กับแต่ละโมเดล
ในแบบฝึกหัดนี้ คุณจะเตรียมโมเดลที่ฟิตดีที่สุดและแย่ที่สุดสี่โมเดลสำหรับการสำรวจเพิ่มเติม โดยใช้ augment() เพื่อเพิ่มข้อมูลเข้าไปในโมเดล
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Machine Learning ใน Tidyverse
คำแนะนำการฝึกหัด
- สร้าง data frame ชื่อ
best_augmentedโดยสร้าง augmented data frames แล้ว simplify ด้วยunnest()จาก data framebest_fit - สร้าง data frame ชื่อ
worst_augmentedโดยสร้าง augmented data frames แล้ว simplify ด้วยunnest()จาก data frameworst_fit
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
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
___